Monday, November 23, 2009

C Language


char strNames[256];

scanf("%d", &a);

//this 2 functions cannot be used after scanf because the scanf will post a newline character after execution and gets or fgets will regard it as an input and hence will not prompt for input.

gets(a);
fgets(a, strlen(a), stdin);

No comments:

Post a Comment