2. Consider the following function: int secret(int one) { int i; int prod = 1; for (i = 1; i


2. Consider the following function:<br>int secret(int one)<br>{<br>int i;<br>int prod = 1;<br>for (i = 1; i<= 3; i++)<br>prod = prod * one;<br>return prod;<br>}<br>What is the output of the following C++ statements?<br>i. cout << secret(5) << endl;<br>ii. cout << 2 * secret(6) << endl;<br>

Extracted text: 2. Consider the following function: int secret(int one) { int i; int prod = 1; for (i = 1; i<= 3;="" i++)="" prod="prod" *="" one;="" return="" prod;="" }="" what="" is="" the="" output="" of="" the="" following="" c++="" statements?="" i.="" cout="">< secret(5)="">< endl;="" ii.="" cout="">< 2="" *="" secret(6)=""><>

Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here