Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

The output is not clear to me?

+4 votes
asked Apr 22, 2019 by Faizan Ahmed (160 points)
int a = 4;
    cout<<a++<<" "<<++a<<" "<<a++;

output: 6 7 4

But I aspect is : 4 6 6

1 Answer

0 votes
answered May 25, 2019 by Shubham Sapkal (150 points)
In my machine output is :- 4 6 6

The Output of the is Also depend upon the machine. In Window Value of integer will be 2 bits but In Unix Operating System , Value of interger is 4bits . So , It also Effect the ooutput .

So , Run and check your program in right machine.

Thank you...
commented Jun 6, 2019 by anonymous
this is incorrect
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.