Skip to content

Commit a404c84

Browse files
authored
Merge pull request #20 from ar-rafi-087/patch-2
create file.c
2 parents 2aa9320 + d8284f9 commit a404c84

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

file.c

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#include<stdio.h>
2+
3+
int main(){
4+
FILE *ptr;
5+
int i;
6+
ptr = fopen("q5.txt", "r");
7+
fscanf(ptr, "%d", &i);
8+
ptr = fopen("q5.txt", "w");
9+
fprintf(ptr, "%d", i*2);
10+
fclose(ptr);
11+
return 0;
12+
}

0 commit comments

Comments
 (0)