Record Detail

Runtime Error

/in/lab4.c: In function 'calculate':
/in/lab4.c:37:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i = 0; i < strlen(input); i++) {
                      ^
/in/lab4.c:177:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if(i == strlen(input)) {
              ^~
/in/lab4.c:33:9: warning: unused variable 'flag_neg' [-Wunused-variable]
     int flag_neg = 0;
         ^~~~~~~~
/in/lab4.c: In function 'main':
/in/lab4.c:236:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int i = 0; i < strlen(input); i++) {
                          ^
/in/lab4.c:268:25: warning: array subscript has type 'char' [-Wchar-subscripts]
                     temp[i_name] = '\0';
                         ^
/in/lab4.c:275:21: warning: array subscript has type 'char' [-Wchar-subscripts]
                 temp[i_name++] = input[now++];
                     ^
/in/lab4.c:306:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int i = 0; i < strlen(input); i++) {
                          ^
/in/lab4.c: In function 'calculate':
/in/lab4.c:208:35: warning: 'temp_ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
             stack_cal[++head_cal] = temp_ans;
             ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
/in/lab4.c: In function 'main':
/in/lab4.c:262:38: warning: 'flag_end' may be used uninitialized in this function [-Wmaybe-uninitialized]
                 if(input[now] == ',' || now == flag_end ) {
                    ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
# Status Time Cost Memory Cost
#1 Runtime Error (1) Detail 27ms 7.348 MiB

Information

Submit By
Type
Submission
Homework
Lab 4 (TEST ONLY)
Language
C
Submit At
2021-11-11 00:06:29
Judged At
2021-11-21 14:58:54
Judged By
Score
0
Total Time
27ms
Peak Memory
7.348 MiB