Record Detail

Compile Error

/in/fileReverse.c:4:5: error: second argument of 'main' should be 'char **' [-Werror=main]
 int main(int argc,char argv[]){
     ^~~~
/in/fileReverse.c: In function 'main':
/in/fileReverse.c:9:22: error: passing argument 1 of 'fopen' makes pointer from integer without a cast [-Werror=int-conversion]
     FILE *read=fopen(argv[0],"a+");
                      ^~~~
In file included from /in/fileReverse.c:1:0:
/usr/include/stdio.h:232:14: note: expected 'const char * restrict' but argument is of type 'char'
 extern FILE *fopen (const char *__restrict __filename,
              ^~~~~
/in/fileReverse.c:11:19: error: conversion to 'int' from 'size_t {aka long unsigned int}' may alter its value [-Werror=conversion]
     string_length=strlen(line);
                   ^~~~~~
cc1: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Midterm Exam 2
Language
C
Submit At
2022-07-07 14:36:08
Judged At
2022-07-08 16:05:13
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes