+ 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
2 Answers
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