Record Detail

Compile Error

/in/fileReverse.c: In function 'main':
/in/fileReverse.c:15:12: error: conversion to 'char' from 'int' may alter its value [-Werror=conversion]
         *s=fscanf(fread,"%s\n",str[i]);
            ^~~~~~
/in/fileReverse.c:16:13: error: conversion to 'int' from 'size_t {aka long unsigned int}' may alter its value [-Werror=conversion]
         len=strlen(s);
             ^~~~~~
/in/fileReverse.c:21:24: error: passing argument 2 of 'fprintf' makes pointer from integer without a cast [-Werror=int-conversion]
         fprintf(fwrite,'\n');
                        ^~~~
In file included from /in/fileReverse.c:4:0:
/usr/include/stdio.h:312:12: note: expected 'const char * restrict' but argument is of type 'int'
 extern int fprintf (FILE *__restrict __stream,
            ^~~~~~~
/in/fileReverse.c:21:9: error: format not a string literal and no format arguments [-Werror=format-security]
         fprintf(fwrite,'\n');
         ^~~~~~~
cc1: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Midterm Exam 2
Language
C
Submit At
2022-07-07 15:44:54
Judged At
2022-07-08 16:04:57
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes