int recFunc(int num){ if (num >= 10) return 10; else return num * recFunc(num + 1);}
Consider the accompanying definition of a recursive function. What is the output of the following statement?cout << recFunc(10) << endl;
A. 10
B. 11
C. 100
D. 110
Answer: A
Computer Science & Information Technology
You might also like to view...
Polymorphism specifically enables the creation of programs that handle:
a) classes that are containers for other classes b) large amounts of data with efficiency c) a wide variety of classes in a general manner d) None of the above
Computer Science & Information Technology
List four of the items that the EBK specifies for the implementation function.
What will be an ideal response?
Computer Science & Information Technology