char line[MAXBUF];
char *result;
while((result = fgets(line, MAXBUF, fp)) != NULL) {
printf(result);
}
The following code doesn't work fully. Does anyone know how to print result?? MAXBUF is defined to be 1024 and fp is just a file pointer to some file. What im suppose to do in this assignment is read file and print the files output to standard output. Any ideas?
On the line printf(result) i get this error "warning: format not a string literal and no format arguments"