Skip to content

Instantly share code, notes, and snippets.

@itsfarseen
Created September 5, 2019 18:03
Show Gist options
  • Save itsfarseen/59e83263112344094ead4d4b1870db3a to your computer and use it in GitHub Desktop.
Save itsfarseen/59e83263112344094ead4d4b1870db3a to your computer and use it in GitHub Desktop.
#include <stdio.h>
char buf[1024];
int main()
{
printf("Hello: \n");
while (1)
{
// If I comment this line, reader works as expected.
fgets(buf, 10, stdin);
printf("You entered: %s\n", buf);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment