I have two doubts relating to the following code.
1. In the above code if i remove the fpurge() function then i am not able to input the character (i.e.,) the scanf() for getting the character got skipped
printf("Enter some integer value:");
printf("Enter some character:");
printf("Input values are %d and %c\n",i,c);
2. When i look into the man page for fpurge() it states that this function is not a standard one and also not portable, so i thought i can use fflush(stdin) but when i used fflush instead of fpurge the code works the same way i discussed in first step.
Why is this behaviour happening?