Given the following function definitions and program fragments, what is the output?
void f1(int& z, int &q)
{
int temp;
temp=q;
q=z;
z=temp;
}
void f2( int& a, int& b)
{
if( a
f1(a,b);
else
a=b;
}
int x=3, y=4;
f2(y,x);
cout << x <<" " << y << endl;
a. 3 3
b. 4 3
c. 3 4
d. 4 4
a. 3 3
Computer Science & Information Technology
You might also like to view...
The Power Pivot tab must be added to the Ribbon before you can use the Power Pivot add-in
Indicate whether the statement is true or false.
Computer Science & Information Technology
Users can input and display dates through:
a) the MonthCalendar control b) the DateTimePicker control c) the CalendarTime control d) a and b
Computer Science & Information Technology