Question
1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
int a = 21;
6.
int c ;
7.
c = a++;
8.
cout
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
Answer: Option A
Was this answer helpful ?
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 ?
More Questions on This Topic :
Question 1.
Pick out the correct statement.
....
Submit Solution