phew!! never knew that was happening..
I have a doubt in your method . OK, i will do:
Code:
fgets(&choice,sizeof(char), stdin);
fine, what did you mean by check the contents in memory??
in the mean time i had tried this :
Code:
char *choice;
while(1)
{
choice=malloc(sizeof(char));
printf("what do you want to do \n");
printf("a> Send a file to the backend \n");
printf("b> Read a file in the backend \n");
printf("c> Execute a file in the backend \n");
scanf("%c",choice);
printf("choice entered :%c\n",*choice);
printf("enter the name of the file \n");
..
..
..
..
free(choice);
}
I thought this would work, but it didnt either..
Can you elaborate your idea a little bit..