Answers for "c code write string to file"

C
0

write to file in c programming

[...]
  printf("Enter name: \n");
  if (fgets(name, sizeof name, stdin)) {
    fputs(name,fileptr);
    fclose(fileptr);
    printf("File write was successful\n");
  } else {
    printf("Read error.\n");
  }
Posted by: Guest on May-09-2021

Code answers related to "C"

Browse Popular Code Answers by Language