this actually came up when a group of us were having a discussion..
The code was too simple
Code:
char option;
while(condition )
{
printf( " .............diplays the various options a,b,c, ..............\n");
scanf("%c", &option);
switch- case stuff
...........
various cases
...........
perfrom some operation on condition
}
And his argument was that option was not getting changed anywhere , but still the prog was not working after the first loop.. So, some one came up with an idea that was similar to what i have written..if that is wrong ,please let me know...