Sail E0 Webinar
Question


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
Options:
A .  a:4 b:7
B .  a:10 b:4
C .  a:4 b:10
D .  None of the mentioned
Answer: Option A

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 ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers