Chapter 6: Problem 13
Consider the following function: int secret (int one) \\{ \\[ \begin{array}{l} \text { int i; } \\ \text { int prod = 1 } \\ \text { for }(i=1 ; i<=3 ; i++) \\ \text { prod = prod * one; } \end{array} \\] return prod;} a. What is the output of the following C++ statements? i. cout \(<<\) secret \((5)<<\) endl ii. cout \(<<2 *\) secret \((6)<<\) endl b. What does the function secret do?
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.