| A newbie problem [message #845792] |
Sun, 15 April 2012 08:33 |
Sen Wang Messages: 2 Registered: April 2012 |
Junior Member |
|
|
Hi I'm have a problem about console window output
Here's my code:
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
char str1[20], str2[20];
scanf( "%s", str1 );
printf( "%s\n", str1 );
scanf( "%s", str2 );
printf( "%s\n", str2);
return EXIT_SUCCESS;
}
While I'm running this I entered:
First
and nothing happened, then I entered:
Second
at the end I got:
First
Second
First
Second
That's not I expect, and it's weird for me.
How can I get the normal ordered console?
|
|
|
Powered by
FUDForum. Page generated in 0.01303 seconds