Question: What will be the output of the following code? A. 642 B. 654321 C. 662 D. 6420 #include void recursion (int n) { if (n

What will be the output of the following code?

#include void recursion (int n) { if (n = 0) return; }

A. 642

B. 654321

C. 662

D. 6420

#include void recursion (int n) { if (n = 0) return; } printf("%d", n) ; recursion (n-2); } int main() { recursion (6); return 0;

Step by Step Solution

3.40 Rating (172 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

A Explanation Recursion functions first call ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Data Structures and Other Objects Using Java Questions!