Question: Question 1 1 Consider the following segment of a program intended to swap two values: ` ` ` void swap ( int& , int )
Question
Consider the following segment of a program intended to swap two values:
void swapint& int;
int main
int x y;
swapx y;
return ;
void swapint &a int b
int temp;
temp a;
a b;
b temp;
The values stored in the variables x and y respectively after execution of the code are:
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
