Question
1.
#include
2.
using namespace std;
3.
int main ()
4.
{
5.
int a, b;
6.
a = 10;
7.
b = 4;
8.
a = b;
9.
b = 7;
10.
cout
What is the output of this program?
1.
#include
2.
using namespace std;
3.
int main ()
4.
{
5.
int a, b;
6.
a = 10;
7.
b = 4;
8.
a = b;
9.
b = 7;
10.
cout
Answer: Option A
Was this answer helpful ?
In this program, we are reassigning the values of a and b because of this we got the output as a:4 b:7
Output:
$ g++ ess.cpp
$ a.out
a:4 b:7
Was this answer helpful ?
Submit Solution