ok, compile this code, then explain why it does what it does...
/* Start Of Code */
#include <stdio.h>
char c;
int main ()
{
printf ("Scanf Test\n");
printf ("enter a character >");
scanf ("%c", &c);
printf ("Char was [%c]\n", c);
printf ("Getc test\n");
printf ("Enter a character >");
c = getc (stdin);
printf ("Char was [%c]\n", c);
return 0;
}
/* End of Code */
What does it do? It will let me input the first char, but never asks for the
second. Why? and how can i make it ask for the second (or however many i ask
it for).
incidentally, i've seen EXACTLY the same 'feature' in Assembly, Pascal and
Modula 2!
-[[EMAIL PROTECTED]]-------------------------------------------------
Http://x-map.home.ml.org Mailto : [EMAIL PROTECTED]
---[Quote Of The Day]----------------------------------------------------------
Old programmers never die. They just branch to a new address.
-------------------------------------------------------------------------------