C
This commit is contained in:
16
w3school/fileopen.c
Normal file
16
w3school/fileopen.c
Normal file
@ -0,0 +1,16 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main () {
|
||||
|
||||
FILE *fptr;
|
||||
|
||||
fptr = fopen("test1.txt", "r");
|
||||
char myStr[100];
|
||||
|
||||
while(fgets(myStr, 100, fptr)) {
|
||||
printf("%s", myStr);
|
||||
}
|
||||
fclose (fptr);
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user