4. Check out the given code. void rec(int n){ if (n!=10){ rec(n+1); cout


4. Check out the given code.<br>void rec(int n){<br>if (n!=10){<br>rec(n+1);<br>cout<<n<<endl;<br>}<br>}<br>int main(){<br>int y = 5;<br>rec(y);<br>}<br>(a)<br>(b)-<br>following code? Explain your answer.<br>What will be output of this code? Explain with a call stack (stack frames).<br>What will be the output of this code if we update our main function with the<br>int main(){<br>int y = 5;<br>int &x = y;<br>rec(x);<br>}<br>

Extracted text: 4. Check out the given code. void rec(int n){ if (n!=10){ rec(n+1); cout<>

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here