Question
1.
#include
2.
using namespace std;
3.
int main ()
4.
{
5.
int x, y;
6.
x = 5;
7.
y = ++x * ++x;
8.
cout
What is the output of this program?
1.
#include
2.
using namespace std;
3.
int main ()
4.
{
5.
int x, y;
6.
x = 5;
7.
y = ++x * ++x;
8.
cout
Answer: Option A
Was this answer helpful ?
Because of the precedence the pre-increment and post increment operator, we got the output
as 749736.
Output:
$ g++ op.cpp
$ a.out
749736
Was this answer helpful ?
More Questions on This Topic :
Question 3.
What is the use of dynamic_cast operator?
....
Question 6.
What is this operator called ?: ?
....
Submit Solution