This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Read Single Char
- From: Bharathi S <bharathi at lantana dot tenet dot res dot in>
- To: GNU GCC <gcc-help at gcc dot gnu dot org>
- Date: Thu, 5 Jun 2003 17:19:43 +0530 (IST)
- Subject: Read Single Char
Hello All,
The following prg is taking the value 10 (Enter ? ) in the every 2
pass. fflush - No use. What is the reason ?
main(){
char c;
int i;
for( i=0; i<=10; i++ ){
fflush(stdin);
scanf( "%c", &c );
printf("\n Input[%d] ==> %d", i, c);
}
}
TIA,
--
Bharathi S, IndLinuX Team, (__)
DON Lab, TeNeT Group, oo )
IIT-Madras, Chennai-INDIA. (_/\
Don't scream for the Change. Become the Change.