Why this code runs infinitely when i use int foo(num - -) for recursive calls? I expected that it decrement value automatically | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why this code runs infinitely when i use int foo(num - -) for recursive calls? I expected that it decrement value automatically

https://code.sololearn.com/cXNak2xU4V9a/?ref=app

8th Oct 2019, 3:50 PM
Joѕнυα
Joѕнυα - avatar
1 Answer
0
num -- doesnt do what you expect. If you use num-1 instead, it works.
8th Oct 2019, 5:04 PM
Lord HN
Lord HN - avatar