Notes
This function is in beta test. Please help improve it in the issues
here.
/in/lab4.c:39:28: runtime error: index -1 out of bounds for type 'char [100]' ================================================================= ==47826==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffded4b5e5f at pc 0x55f23824b0fb bp 0x7ffded4b46b0 sp 0x7ffded4b46a0 READ of size 1 at 0x7ffded4b5e5f thread T0 #0 0x55f23824b0fa in main (/out/package/lab4+0x350fa) #1 0x7fcccc497b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) #2 0x55f238251929 in _start (/out/package/lab4+0x3b929) Address 0x7ffded4b5e5f is located in stack of thread T0 at offset 5695 in frame #0 0x55f238236e3f in main (/out/package/lab4+0x20e3f) This frame has 11 object(s): [32, 192) 'varvalue' [224, 524) 'vars' [576, 1536) 'stack1' [1568, 2528) 'stack2' [2560, 3584) 'helper' [3616, 5664) 'stack3' [5696, 5796) 'com' <== Memory access at offset 5695 underflows this variable [5856, 6112) 'str' [6144, 6400) 'strong' [6432, 6688) 'str1' [6720, 6976) 'st
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