int n 1; // global %3D print1 (int x) { cout

Solve the two questions fast pleaseint n<br>1; // global<br>%3D<br>print1 (int x) {<br>cout << x + n;<br>plus_n () {<br>n = n + 2;<br>print1 (n);<br>main () {<br>int n;<br>n = 20;<br>print1 (5);<br>n = 40;<br>plus_n ();<br>cout << n;<br>what is the output of main under:<br>a. Static scoping rules<br>6 6 40<br>b. Dynamic scoping rules<br>25 84 40<br>

Extracted text: int n 1; // global %3D print1 (int x) { cout < x="" +="" n;="" plus_n="" ()="" {="" n="n" +="" 2;="" print1="" (n);="" main="" ()="" {="" int="" n;="" n="20;" print1="" (5);="" n="40;" plus_n="" ();="" cout="">< n;="" what="" is="" the="" output="" of="" main="" under:="" a.="" static="" scoping="" rules="" 6="" 6="" 40="" b.="" dynamic="" scoping="" rules="" 25="" 84="">

Jun 03, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here