1.

What is the output of this program?
#include 
using namespace std;
void swap(int &p, int &q);
int main()
{
int p = 5, q = 10;
swap(p, q);
cout << " In main " << p << q;
return 0;
}
void swap(int &p, int &q)
{
int temp;
temp = p;
p = q;
q = temp;
cout << "In swap " << p << q;
}

A. In swap 11 15
B. In main 11 15
C. Compilation Error
D. Runtime Error
E. In swap 11 15 In main 11 15
Answer» F.


Discussion

No Comment Found

Related MCQs