1
Reply

Wy output of cout<<++c<

rajeev kumar

rajeev kumar

17y
6.5k
0
Reply

    If you question is What will be the output then the answer is:


    This is the case of pre-increment and post-increment.
    Pre-Increment:  In this first the value of attribute is incremented by 1 and then further operation will carried out.
    Post-Increment: In this first operation is carried out and then value is incremented by 1.

    Your Example is the case of Pre-incrementation. So first the value of "c" will increment by 1 and then will perform cout operation i.e. if the value of "c" is 25 then in output we will see the value of c is 26 if you write something after second << otherwise the program will not get compiled because of the syntax problem or "; (Semicolon) " missing at the end of line.