Notes
This function is in beta test. Please help improve it in the issues
here.
/in/lab4.c:89:41: runtime error: index 200 out of bounds for type 'char [200]' /in/lab4.c:89:41: runtime error: load of address 0x7ffe6de43d58 with insufficient space for an object of type 'char' 0x7ffe6de43d58: note: pointer points here 7f 00 00 00 03 00 00 00 a8 7f 00 00 40 3e e4 6d fe 7f 00 00 00 00 00 00 a8 7f 00 00 f0 a1 ee 5b ^ ================================================================= ==46455==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffe6de43d58 at pc 0x55b6135f6a74 bp 0x7ffe6de42dc0 sp 0x7ffe6de42db0 READ of size 1 at 0x7ffe6de43d58 thread T0 #0 0x55b6135f6a73 in main (/out/package/lab4+0xca73) #1 0x7fa85987cb96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) #2 0x55b6135fa509 in _start (/out/package/lab4+0x10509) Address 0x7ffe6de43d58 is located in stack of thread T0 at offset 3656 in frame #0 0x55b6135f290f in main (/out/package/lab4+0x890f) This frame has 10 object(s): [32, 1632) 'num' [1664, 3264) 'stacki'
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
Show the results! a * b = 70.910000, b - c + a * f = 13932.010000 ans = -7062633.450000