At a line file1 = fopen("infile1","w"); arethere any modes to extend the file ( add more information into file without deleting the old information)Code:#include <stdio.h>
#include <stdlib.h>
/*
*
*/
int main(void) {
/* Create a file */
FILE *file1, *file2, *file3;
char buff[BUFSIZ];
int cha;
int cha1;
int tem = 0;
file1 = fopen("infile1","w");
/* Get charater from the file and compare to EOF */
while( fgets(buff, sizeof(buff), stdin)) {
tem = 0;
while ( tem < strlen(buff) ) {
fputc((int)buff[tem],file1);
tem = tem + 1;
}
}
fclose(file1);
return 0;
}