hello,
Its a come back for me to this forum after a long time,
I have got this weird problem that getchar wont function after two successive scanf's
Code:
#include <stdio.h>
main(){
int a;
int b;
int c;
scanf("%d",&a);
scanf("%d",&b);
while((c=getchar())!='\n')
putchar(c);
printf("%d %d",a,b);
}
I do know that scanf doesn't flush input stream, and can i get any other neat way to code this. where i can even take the input from the get char. i observed the same problem even while using "fgets" instead of getchar
thanks in advance