Can Recursion be named as a simple function call?
问题 Please consider an Recursive function : 1) int calc(int num) { 2) sum=sum+num;//sum is a global variable 3) num--; 4) if(num==0) 5) return sum; 6) calc(num); } It calculates the sum of an integer . My teacher told me it's not recursion, but a simple function call, because you need to pass num-- as an argument and return calc(num--) . I was shocked, as I knew only one thing when a function call itself, its recursion. She also gave the reason, that line no. 2 and 3 is stored extra in stack