what is fprintf in c
#include<stdio.h>
int main() {
int i, x = 4;
char s[20];
FILE *f = fopen("new.txt", "w");
if (f == NULL) {
printf("Could not open file");
return 0;
}
for (i=0; i<x; i++) {
puts("Enter text");
gets(s);
fprintf(f,"%d.%s\n", i, s);
}
fclose(f);
return 0;
}
3.86
7
int fprintf(FILE *fptr, const char *str, ...);
Thank you!
7
0
Are there any code examples left?
New code examples in category C
-
C 2022-03-27 22:30:45 Problem Statement Print the following output: \ Input Format IN Output Format \
-
-
-
-
-
-
-