Xref: utzoo comp.std.c:4455 comp.os.msdos.programmer:3863 Path: utzoo!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!hsdndev!wuarchive!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!brolga!bunyip.cc.uq.oz.au!zeus!s64421 From: s64421@zeus.usq.EDU.AU (house ron) Newsgroups: comp.std.c,comp.os.msdos.programmer Subject: Is this a bug in Quick C? Message-ID: Date: 11 Mar 91 09:34:02 GMT Lines: 25 A friend has found that the following program behaves oddly under Quick C: main() { int i,j;char c; i = scanf("%d%c",&j,&c); printf("%d %d %c\n",i,j,c); } The idea is to have the newline typed after the number put into c. However, Quick C version 2.5 requires that the user type TWO newlines before any output is produced. Earlier versions, and other C compilers I have tried (Power C, TopSpeed C) produce their output after the expected one newline. I know the behaviour of Quick C V2.5 is wierd, but is it actually ILLEGAL, according to the ANSI C standard? It is a question of timing, and most language standards are very lax about that issue. -- Regards, Ron House. (s64421@zeus.usq.edu.au) (By post: Info Tech, U.C.S.Q. Toowoomba. Australia. 4350)