Record Detail

Accepted

/in/lab4.c: In function 'main':
/in/lab4.c:59:18: warning: character constant too long for its type
         if (isin('fprintf', string) == 1) {
                  ^~~~~~~~~
/in/lab4.c:59:18: warning: overflow in implicit constant conversion [-Woverflow]
/in/lab4.c:60:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (int i = 0; i < strlen(string); i++) {
                               ^
/in/lab4.c:66:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (int i = place1 + 1; i < strlen(string); i++) {
                                        ^
/in/lab4.c:74:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (int i = 0; i < strlen(print); i++) {
                               ^
/in/lab4.c:40:30: warning: unused variable 'topvarsb' [-Wunused-variable]
     int a = 0, topvarsa = 0, topvarsb = 0;
                              ^~~~~~~~
/in/lab4.c:40:16: warning: unused variable 'topvarsa' [-Wunused-variable]
     int a = 0, topvarsa = 0, topvarsb = 0;
                ^~~~~~~~
/in/lab4.c:40:9: warning: unused variable 'a' [-Wunused-variable]
     int a = 0, topvarsa = 0, topvarsb = 0;
         ^
/in/lab4.c:39:12: warning: variable 'varvalue' set but not used [-Wunused-but-set-variable]
     double varvalue[20]; //to store the value of the variables.
            ^~~~~~~~
/in/lab4.c: In function 'getpriority':
/in/lab4.c:33:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
/in/lab4.c: In function 'main':
/in/lab4.c:99:31: warning: 'result' may be used uninitialized in this function [-Wmaybe-uninitialized]
             varvalue[varnums] = result;
             ~~~~~~~~~~~~~~~~~~^~~~~~~~
/in/lab4.c:72:56: warning: 'place2' may be used uninitialized in this function [-Wmaybe-uninitialized]
             strncpy(print, string + place1 + 1, place2 - place1 - 1);
                                                 ~~~~~~~^~~~~~~~
/in/lab4.c:57:13: warning: 'place1' may be used uninitialized in this function [-Wmaybe-uninitialized]
         int place1, place2;
             ^~~~~~
/in/lab4.c:42:9: warning: 'position' may be used uninitialized in this function [-Wmaybe-uninitialized]
     int position;
         ^~~~~~~~
# Status Time Cost Memory Cost
#1 Accepted Detail 28ms 6.18 MiB

Information

Submit By
Type
Submission
Homework
Lab 4 (TEST ONLY)
Language
C
Submit At
2021-11-05 19:08:26
Judged At
2021-11-21 14:58:34
Judged By
Score
20
Total Time
28ms
Peak Memory
6.18 MiB