I have the below code,
fflush(stdin);
print("Enter y/n");
scanf("%c",&a);
Here,it is quitting before giving the input.it looks like the issue is because it is not flushing out the input buffer which might be having some junk characters.Is there any alternative for flush(stdin).This code snippet is working in Solaris but it is not working in Linux.