Question: int x = 3 , y = 2 ;void swapplus 1 ( int n 1 , int n 2 ) { int temp = n
int x y ;void swapplusint n int nint temp n;n n;n temp;void swapplusint& n int& nint temp n;n n;n temp;void swapplusconst int& n const int& nint temp n;int temp n;temp temp;void swapplusint p int pint temp p;pp;p temp;void swapplusint &p int &pint temp p;p p;p temp;void printconst int& x const int& ycout
x: x y: y;int mainint arr;y arr sizearr ;cout "arr: arr sizearr: sizearr y: y endl;swapplusx y; printx y;swapplusx y; printx y;swapplusx y; printx y;swapplus&x &y; printx y;int px &xpy &y;swappluspx py; printx y;return ;This program outputs lines. What are they?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
