#64_Funtions for File I/O in C
# include <stdio.h> int main () { FILE * ptr = NULL ; //declaring file pointer // char string[45]="This is another file."; //string to pass in file // ptr=fopen("File.txt","w"); //opens the file to write // fprintf(ptr, "%s", string);//to print content in file // fclose(ptr);// to close the file after using // char string[45]="This is another file's content."; //string to pass in file // ptr=fopen("File.txt","a"); //opens the file to write...
Comments
Post a Comment