Question: Question 1 1 Consider the following segment of a program intended to swap two values: ` ` ` void swap ( int& , int )

Question 11
Consider the following segment of a program intended to swap two values:
```
void swap(int&, int);
int main()
{
int x=0, y=1;
swap(x, y);
return 0;
}
void swap(int &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:
10
00
21
11
12
01
Question 1 1 Consider the following segment of a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!