Record Case Detail

Notes

This function is in beta test. Please help improve it in the issues here.

Stderr

/in/lab5.c:149:16: runtime error: index 20 out of bounds for type 'char [20]'
/in/lab5.c:149:21: runtime error: store to address 0x7ffea14881f4 with insufficient space for an object of type 'char'
0x7ffea14881f4: note: pointer points here
  30 32 2e 30 fe 7f 00 00  ec cb 5e 11 64 55 00 00  50 82 48 a1 fe 7f 00 00  0f c9 5e 11 64 55 00 00
              ^ 
=================================================================
==4493==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffea14881f4 at pc 0x5564115edc2e bp 0x7ffea1488140 sp 0x7ffea1488130
WRITE of size 1 at 0x7ffea14881f4 thread T0
    #0 0x5564115edc2d in changetodouble (/out/package/lab5+0xac2d)
    #1 0x5564115ebe57 in main (/out/package/lab5+0x8e57)
    #2 0x7f9a42c43c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
    #3 0x5564115ec709 in _start (/out/package/lab5+0x9709)

Address 0x7ffea14881f4 is located in stack of thread T0 at offset 52 in frame
    #0 0x5564115ed17f in changetodouble (/out/package/lab5+0xa17f)

  Th

Hints

Your answer may be identical to the JOJ answer in the first several lines.

However, the main problem you meet now is Runtime Error. And the exit code of your program is 1, which should be 0.

Please double check your code to solve this problem and try again.

Your Answer


        

JOJ Answer

2.000000
0.000250
-0.250000
0.888889
-3.777800
777.375000
64.000000
4.160000
2.550000
128.000000