Int Funcb Int Int Funca Int N N Q37271466

… int funcB(int);

int funcA(int n) {

if (n <= 1)

return 1;

else return n + funcB(n – 2); }

int funcB(int n) {

if (n <= 3)

return 1; else return n * funcA(n – 3); }

int main() { int num = 11; cout << funcA(num); return 0;}

What is the output of this program? Please show your work


Answer


Function call Trace:———————-funcA(11)funcB(9)funcA(6)funcB(4)funcA(1)Output:———101

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.