C - Not printing out the whole string
int main()
{
//Define Variables
char studentName;
//Print instructions to fill the data in the screen
printf("Please type in the Students name:\n");
scanf("%s", &studentName);
printf("\n\n%s", &studentName);
return 0;
}
Seeing the above code, I am only printing to screen out the first word
when I type in a sentence.
I know it is a basic thing, but I am just starting with plain C:-)
Thanks
No comments:
Post a Comment