Skip to content

Instantly share code, notes, and snippets.

@kokosabu
Created September 10, 2014 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kokosabu/877609cfbc01771ffd83 to your computer and use it in GitHub Desktop.
Save kokosabu/877609cfbc01771ffd83 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main()
{
FILE *input;
char buf[16];
input = fopen("num.txt", "r");
if(input == NULL) { return -1; }
while (fgets(buf, 16, input) != NULL) {
printf("%s", buf);
}
fclose(input);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment