Read Single Char
Bharathi S
bharathi@lantana.tenet.res.in
Fri Jun 6 08:29:00 GMT 2003
On Thu, 5 Jun 2003, John Love-Jensen wrote:
Thanks John,
> Probably because you are doing something like this on the input
> stream: 1\n2\n3\n4\n5\n Change your scanf to this:
> scanf("%c\n", &c);
1st time, this go next stat only after reading 4 char ( 1\n2\n ). But
the outputs are correct. I am getting the output 1 after entering 2.
TIA,
--
Bharathi S, IndLinuX Team, (__)
DON Lab, TeNeT Group, oo )
IIT-Madras, Chennai-INDIA. (_/\
Don't scream for the Change. Become the Change.
More information about the Gcc-help
mailing list