i'm having problems with the scanf() function.
i am trying to read a string of char from standard input into my array of char
ie.
program extract
-----------------------------------
char tempStr[MAX];
...
printf("Type string to read in: " );
scanf("%s", &tempStr);
printf("\n\nYou typed: %s\n", tempStr );
______________________
now when i am prompted for a string, say
sample output
______________________
Type string to read in: this is a string
You typed: this
-----------------------------------
Q) Why isn't it reading the entire line (this is a string)?
I appreciate your feedback.