This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

question about printf


I have a kind of goofy question,
Not sure if this is the place to talk about it or not.
I scanned through the old posts and couldn't find anything about it.

Basically here is the problem  (Which occurs only on linux machines)

printf("%c %c %c %c\n",getchar(),getchar(),getchar(),getchar());

Preforms the getchar's backwards.  Is this a problem, or is it just
a coding problem?

The fix is of course to store the getchar's in var's before
printing them out.

Thanks for any info,

Kent Mein


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]