Sail E0 Webinar
Question


What is the output of this program?


1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
int a = 21;
6.
int c ;
7.
c = a++;
8.
cout
Options:
A .  21
B .  22
C .  23
D .  20
Answer: Option A

Explanation:value of 'a' will be stored in c and then only it will be incremented.
Output:
$ g++ incre.cpp
$ a.out
21




Was this answer helpful ?
Next Question

Submit Solution

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

Latest Videos

Latest Test Papers