New course! Every coder should learn Generative AI!
Try a free lesson0
Why the loop is running infinite
3 Answers
+ 6
Because foo(num--) passes num's original value to the function foo before decrementing variable num.
+ 1
Thanks
0
Function 'foo' has void return type, yet you return something in its body.