Record Detail

Compile Error

/in/ex1.c: In function 'main':
/in/ex1.c:6:18: error: invalid initializer
     char new[16]=0;
                  ^
/in/ex1.c:10:17: error: conversion to 'int' from 'size_t {aka long unsigned int}' may alter its value [-Werror=conversion]
         int len=strlen(string);
                 ^~~~~~
/in/ex1.c:12:17: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
             if (string[j]='.'){
                 ^~~~~~
/in/ex1.c:13:17: error: expected expression before '[' token
             new=[new,string[j]]
                 ^
/in/ex1.c:13:21: error: left-hand operand of comma expression has no effect [-Werror=unused-value]
             new=[new,string[j]]
                     ^
/in/ex1.c:6:10: error: variable 'new' set but not used [-Werror=unused-but-set-variable]
     char new[16]=0;
          ^~~
/in/ex1.c:5:14: error: unused parameter 'argc' [-Werror=unused-parameter]
 int main(int argc, char *argv[]){
              ^~~~
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:12:54
Judged At
2022-07-08 16:06:13
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes