Record Detail

Compile Error

/in/ex1.c: In function 'main':
/in/ex1.c:10:17: error: format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[100]' [-Werror=format=]
         scanf("%s", &all[i]);
                ~^   ~~~~~~~
/in/ex1.c:15:33: error: passing argument 2 of 'strcpy' makes pointer from integer without a cast [-Werror=int-conversion]
                 strcpy(tail[i], all[i][j+1]);
                                 ^~~
In file included from /in/ex1.c:3:0:
/usr/include/string.h:121:14: note: expected 'const char * restrict' but argument is of type 'char'
 extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
              ^~~~~~
/in/ex1.c:21:25: error: conversion to 'char' from 'int' may alter its value [-Werror=conversion]
             tail[i][j]= tolower(tail[i][j]);
                         ^~~~~~~
cc1: all warnings being treated as errors

Information

Submit By
Type
Submission
Problem
Mid2 Ex1
Homework
Midterm Exam 2
Language
C
Submit At
2022-07-07 15:43:50
Judged At
2022-07-08 16:05:09
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes