Record Detail

Runtime Error

/in/ex1.c: In function 'main':
/in/ex1.c:18:15: warning: comparison with string literal results in unspecified behavior [-Waddress]
     if (a.PorM=="-"){
               ^~
/in/ex1.c:21:15: warning: comparison with string literal results in unspecified behavior [-Waddress]
     if (b.PorM=="-"){
               ^~
/in/ex1.c:24:10: warning: comparison with string literal results in unspecified behavior [-Waddress]
     if (c=="+"){
          ^~
/in/ex1.c:15:5: warning: 'a.i' is used uninitialized in this function [-Wuninitialized]
     scanf("%d%c%d%c ",&a.real,a.PorM,&a.imaging,a.i);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/ex1.c:15:5: warning: 'a.PorM' is used uninitialized in this function [-Wuninitialized]
/in/ex1.c:17:5: warning: 'c' is used uninitialized in this function [-Wuninitialized]
     scanf("%c",c);
     ^~~~~~~~~~~~~
# Status Time Cost Memory Cost
#1 Runtime Error 1ms 340.0 KiB
#2 Runtime Error 1ms 344.0 KiB
#3 Runtime Error 1ms 288.0 KiB
#4 Runtime Error 1ms 340.0 KiB
#5 Runtime Error 1ms 328.0 KiB
#6 Runtime Error 1ms 328.0 KiB
#7 Runtime Error 1ms 328.0 KiB
#8 Runtime Error 1ms 376.0 KiB
#9 Runtime Error 1ms 328.0 KiB
#10 Runtime Error 1ms 344.0 KiB

Information

Submit By
Type
Submission
Problem
h4ex1: Structure, basic programming
Homework
Assignment 4
Language
C
Submit At
2018-06-23 14:45:02
Judged At
2018-06-23 14:45:02
Judged By
Score
0
Total Time
12ms
Peak Memory
376.0 KiB