SyntaxFix
Write A Post
Hire A Developer
Questions
If you need to read more than one line, need to clear buffer. Example:
int n; scanf("%d", &n); char str[1001]; char temp; scanf("%c",&temp); // temp statement to clear buffer scanf("%[^\n]",str);