Notes
This function is in beta test. Please help improve it in the issues
here.
/in/lab4.c:151:26: runtime error: index -1 out of bounds for type 'char [100]' ================================================================= ==47660==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffcad3cc3cf at pc 0x561157d2aa50 bp 0x7ffcad3cab60 sp 0x7ffcad3cab50 READ of size 1 at 0x7ffcad3cc3cf thread T0 #0 0x561157d2aa4f in main (/out/package/lab4+0x1ba4f) #1 0x7fa6d652cb96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) #2 0x561157d2b8a9 in _start (/out/package/lab4+0x1c8a9) Address 0x7ffcad3cc3cf is located in stack of thread T0 at offset 5951 in frame #0 0x561157d1eaff in main (/out/package/lab4+0xfaff) This frame has 16 object(s): [32, 432) 'is_number' [480, 880) 'is_print' [928, 1728) 'print' [1760, 2560) 'floatnumbers' [2592, 3392) 'stack2' [3424, 5472) 'value' [5504, 5524) 'symbol_precedence2' [5568, 5588) 'symbol_precedence3' [5632, 5732) 'arr_withoutblank' [5792, 5892) 'numbers_withoutblank' [5952, 60
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