-
What is the output of this program?
#include
using namespace std;
void copy (int& p, int& q, int& r)
{
p = p * 1;
q = q * 2;
r = r * 3;
}
int main ()
{
int m = 6, n = 3, o = 2;
copy (m, n, o);
cout << "M = " << m << ", N = " << n << ", O = " << o;
return 0;
}
-
- M = 6, N = 6, O = 6
- N = 6, O = 6, M = 6
- O = 6, M = 6
- Compilation Error
- None of these
Correct Option: A
Because we multiplied the values by 1,2 and 3 in the copy function.