Answer the question
In order to leave comments, you need to log in
Why is the fgets function not working as expected?
There is this code:
int main(void)
{
char name[80]; printf("> ");
fgets(name, 80, stdin);
char *res = strstr("Some text, really some junk text.", name);
if (res)
printf("%s\n", res);
return 0;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question