1.

What is the output of this program?
#include <iostream>
using namespace std;
int main ()
{
int num1, num2;
num1 = 6;
num2 = 5;
num1 = num2;
num2 = 3;
cout << "num1:";
cout << num1;
cout << ", num2:";
cout << num2;
return 0;
}

A. num1: 5, num2: 3
B. num1: 3, num2: 5
C. num1: 6, num2: 5
D. Compilation Error
E. None of these
Answer» B. num1: 3, num2: 5


Discussion

No Comment Found

Related MCQs