Record Detail

Compile Error

/in/ex4.c:3:1: error: return type defaults to 'int' [-Werror=implicit-int]
 reverse_sort(int subArr1[], int subArr2[], int arrSorted[], int subArr1_len, int subArr2_len){
 ^~~~~~~~~~~~
/in/ex4.c: In function 'reverse_sort':
/in/ex4.c:19:8: error: redeclaration of 'i' with no linkage
    int i;
        ^
/in/ex4.c:7:8: note: previous definition of 'i' was here
    int i = 0;
        ^
/in/ex4.c:22:37: error: operation on 'i' may be undefined [-Werror=sequence-point]
        for(i=i2;i>=0;i--)arrSorted[i++] = subArr2[i];
                                    ~^~
/in/ex4.c:25:37: error: operation on 'i' may be undefined [-Werror=sequence-point]
        for(i=i1;i>=0;i--)arrSorted[i++] = subArr1[i];
                                    ~^~
/in/ex4.c:28:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
cc1: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Homework 5
Language
C
Submit At
2020-07-15 12:23:52
Judged At
2020-07-15 12:23:52
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes