Record Detail

Wrong Answer

/in/database.c: In function 'print_select':
/in/database.c:76:50: warning: unused parameter 'tablename' [-Wunused-parameter]
 void print_select(Select_table *selectTable,char tablename[]) {
                                                  ^~~~~~~~~
/in/database.c: In function 'select':
/in/database.c:149:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (int j = 0; j < strlen(db->tables[loc].assignments[i].course); j++) {
                               ^
/in/database.c:152:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (int j = 0; j < strlen(db->tables[loc].assignments[i].name); j++) {
                               ^
/in/database.c:162:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for (int j = 0; j < strlen(db->tables[loc].assignments[i].course); j++) {
                                   ^
/in/database.c:165:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for (int j = 0; j < strlen(db->tables[loc].assignments[i].name); j++) {
                                   ^
/in/database.c:176:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for (int j = 0; j < strlen(db->tables[loc].assignments[i].course); j++) {
                                   ^
/in/database.c:179:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for (int j = 0; j < strlen(db->tables[loc].assignments[i].name); j++) {
                                   ^
/in/database.c:191:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for (int j = 0; j < strlen(db->tables[loc].assignments[i].course); j++) {
                                   ^
/in/database.c:194:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for (int j = 0; j < strlen(db->tables[loc].assignments[i].name); j++) {
                                   ^
/in/database.c: In function 'move':
/in/database.c:345:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int j = 0; j < strlen(db->tables[loc].assignments[i + 1].course); j++) {
                           ^
/in/database.c:348:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int j = 0; j < strlen(db->tables[loc].assignments[i + 1].name); j++) {
                           ^
/in/database.c: In function 'delete':
/in/database.c:364:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (int j = 0; j < strlen(db->tables[loc].assignments[i].course); j++) {
                               ^
/in/database.c:367:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (int j = 0; j < strlen(db->tables[loc].assignments[i].name); j++) {
                               ^
/in/database.c:379:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for (int j = 0; j < strlen(db->tables[loc].assignments[i].course); j++) {
                                   ^
/in/database.c:382:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for (int j = 0; j < strlen(db->tables[loc].assignments[i].name); j++) {
                                   ^
/in/database.c:396:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for (int j = 0; j < strlen(db->tables[loc].assignments[i].course); j++) {
                                   ^
/in/database.c:399:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for (int j = 0; j < strlen(db->tables[loc].assignments[i].name); j++) {
                                   ^
/in/database.c:413:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for (int j = 0; j < strlen(db->tables[loc].assignments[i].course); j++) {
                                   ^
/in/database.c:416:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for (int j = 0; j < strlen(db->tables[loc].assignments[i].name); j++) {
                                   ^
/in/database.c: In function 'main':
/in/database.c:569:9: warning: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
         gets(str);
         ^~~~
         fgets
/in/database.c: In function 'print':
/in/database.c:68:40: warning: 'loc' may be used uninitialized in this function [-Wmaybe-uninitialized]
     for (int i = 0; i < db->tables[loc].assignNum; i++) {
                         ~~~~~~~~~~~~~~~^~~~~~~~~~
/in/database.c: In function 'save':
/in/database.c:99:40: warning: 'loc' may be used uninitialized in this function [-Wmaybe-uninitialized]
     for (int i = 0; i < db->tables[loc].assignNum; i++) {
                         ~~~~~~~~~~~~~~~^~~~~~~~~~
/in/database.c: In function 'insert':
/in/database.c:136:20: warning: 'loc' may be used uninitialized in this function [-Wmaybe-uninitialized]
     db->tables[loc].assignNum++;
     ~~~~~~~~~~~~~~~^~~~~~~~~~
/in/database.c: In function 'select':
/in/database.c:143:9: warning: 'loc' may be used uninitialized in this function [-Wmaybe-uninitialized]
     int loc;
         ^~~
/in/database.c: In function 'update':
/in/database.c:219:9: warning: 'loc' may be used uninitialized in this function [-Wmaybe-uninitialized]
     int loc;
         ^~~
/in/database.c: In function 'move':
/in/database.c:340:9: warning: 'loc' may be used uninitialized in this function [-Wmaybe-uninitialized]
     int loc;
         ^~~
/in/database.c: In function 'delete':
/in/database.c:358:9: warning: 'loc' may be used uninitialized in this function [-Wmaybe-uninitialized]
     int loc;
         ^~~
/tmp/cc3IRPf1.o: In function `main':
database.c:(.text.startup+0x6f): warning: the `gets' function is dangerous and should not be used.
# Status Time Cost Memory Cost
#1 Wrong Answer Detail 1ms 256.0 KiB
#2 Wrong Answer Detail 1ms 384.0 KiB
#3 Wrong Answer Detail 1ms 380.0 KiB
#4 Wrong Answer Detail 1ms 296.0 KiB
#5 Wrong Answer Detail 1ms 276.0 KiB

Information

Submit By
Type
Submission
Homework
Lab 5 (TEST ONLY) (+AUTO)
Language
C
Submit At
2021-11-17 10:07:39
Judged At
2021-11-21 15:06:49
Judged By
Score
0
Total Time
6ms
Peak Memory
384.0 KiB