#include <stdio.h>
int main() {
char name[50];
printf("enter your name:");
gets(name);
puts(name);
return 0;
}
hello,
the above program should first print out "enter your name:", but it does not.
it occurs in this way on the console:
---------------------------
abc
enter your name:abc
---------------------------
it prints "enter your name" after I enter any input.
What can be the problem?