Question: Consider the following function. int doSomething(int a, int b) { if (b==1) { return a; } else { return a + doSomething(a, b - 1);
Consider the following function. int doSomething(int a, int b) { if (b==1) { return a; } else { return a + doSomething(a, b - 1); } } what will be printed after execution of: cout

Consider the following function int doSomething(int a, int b) if (b--1) return a else return a + doSomething(a, b 1); what will be printed after execution of cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
