Record Detail

Compile Error

/in/fileReverse.c: In function 'main':
/in/fileReverse.c:19:30: error: passing argument 2 of 'strchr' makes integer from pointer without a cast [-Werror=int-conversion]
     char *real = strchr(text," ");
                              ^~~
In file included from /in/fileReverse.c:5:0:
/usr/include/string.h:225:14: note: expected 'int' but argument is of type 'char *'
 extern char *strchr (const char *__s, int __c)
              ^~~~~~
/in/fileReverse.c:20:18: error: conversion to 'int' from 'size_t {aka long unsigned int}' may alter its value [-Werror=conversion]
     int length = strlen(real);
                  ^~~~~~
/in/fileReverse.c:8:14: error: unused parameter 'argc' [-Werror=unused-parameter]
 int main(int argc,char *argv[]) {
              ^~~~
/in/fileReverse.c:8:25: error: unused parameter 'argv' [-Werror=unused-parameter]
 int main(int argc,char *argv[]) {
                         ^~~~
cc1: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Midterm Exam 2
Language
C
Submit At
2022-07-07 15:37:43
Judged At
2022-07-08 16:06:00
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes