Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
Weird usage of printf/scanf? Why do they work?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Eric Sosman, post: 3936117"] The scanf() stuff is explainable, at any rate: As you say, the excess arguments are evaluated, but not otherwise used if the format doesn't mention them (or if scanf() stops early for some other reason). The printf() thing is baffling, and all I can imagine is that it's not the real printf() and/or it's not the real n. Can you post a complete program, rather than just a snippet? (If it's somebody else's work, I'm not sure what the copyright situation might be ...) One other thing to try is the "-W" flag -- despite the name, gcc's "-Wall" does *not* turn on "all" diagnostics. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
Weird usage of printf/scanf? Why do they work?
Top