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 0x7ffc9d4f6554 with insufficient space for an object of type 'char'
0x7ffc9d4f6554: note: pointer points here
  30 32 2e 30 fc 7f 00 00  dc fb bd 34 24 56 00 00  b0 65 4f 9d fc 7f 00 00  0f f9 bd 34 24 56 00 00
              ^ 
=================================================================
==4806==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffc9d4f6554 at pc 0x562434be0c1e bp 0x7ffc9d4f64a0 sp 0x7ffc9d4f6490
WRITE of size 1 at 0x7ffc9d4f6554 thread T0
    #0 0x562434be0c1d in changetodouble (/out/package/lab5+0xac1d)
    #1 0x562434bdee57 in main (/out/package/lab5+0x8e57)
    #2 0x7f5e3bf2cc86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
    #3 0x562434bdf709 in _start (/out/package/lab5+0x9709)

Address 0x7ffc9d4f6554 is located in stack of thread T0 at offset 52 in frame
    #0 0x562434be016f in changetodouble (/out/package/lab5+0xa16f)

  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