Answers for "fprintf c"

C
0

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;
}
Posted by: Guest on October-19-2020
0

what is fprintf in c

int fprintf(FILE *fptr, const char *str, ...);
Posted by: Guest on October-19-2020
0

fprintf c

int fprintf(FILE *stream, const char *format, ...)
Posted by: Guest on September-25-2021

Code answers related to "C"

Browse Popular Code Answers by Language