From: simon <simon.guinot@laposte.net>
To: linux-C-programming <linux-c-programming@vger.kernel.org>
Subject: buggy_double_use_of _scanf
Date: Tue, 26 Oct 2004 14:42:40 +0200 [thread overview]
Message-ID: <417E4640.2040504@laposte.net> (raw)
hello,
I have observe a strange scanf behaviour...
when using two successive scanf... the second receive a return character
for example :
int a;
char b;
scanf ("%d", &a);
fflush (stdin);
scanf ("%c", &b);
fprintf (stdout, "a : %d\nb : %c\n", a, b);
what's the problem ?
is scanf using a buggy internal buffer ?
simon
next reply other threads:[~2004-10-26 12:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-26 12:42 simon [this message]
2004-10-26 20:59 ` buggy_double_use_of _scanf Glynn Clements
2004-11-01 19:03 ` Fábio Russo
2004-11-02 3:44 ` Glynn Clements
-- strict thread matches above, loose matches on Subject: below --
2004-11-01 22:25 Huber, George K RDECOM CERDEC STCD SRI
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=417E4640.2040504@laposte.net \
--to=simon.guinot@laposte.net \
--cc=linux-c-programming@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.