Created
October 30, 2009 04:49
-
-
Save axgle/222131 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(){ | |
FILE *f; | |
f=fopen("data.txt","w"); | |
int i=0; | |
for(i=0;i<10;i++) | |
fprintf(f,"thisi is a test %d\n",i); | |
fclose(f); | |
FILE *ff; | |
char s[255]; | |
ff=fopen("data.txt","r"); | |
while(fgets(s,255,ff)){ | |
printf(s); | |
} | |
fclose(ff); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment