Examveda
Examveda

Determine Output:
void main()
{
      int i=5, j=6, z;
      printf("%d", i+++j);
}

A. 12

B. 13

C. 11

D. None of These

Answer: Option C

Solution(By Examveda Team)

The expression i+++j is treated as ((i++) + j)


This Question Belongs to C Program >> C Miscellaneous

Join The Discussion

Comments ( 4 )

  1. Deepak Goyal
    Deepak Goyal :
    4 years ago

    i++ is post increment so will not increase by 1
    5++ + 6=11

  2. Kajal Baswaraj
    Kajal Baswaraj :
    4 years ago

    if(i++)+j means (5+1)+6=12 how it will print 11

  3. Lavanya Reddy
    Lavanya Reddy :
    6 years ago

    here the (i++)+j means (5+1)+6=12



































  4. Harish
    Harish :
    7 years ago

    why is it not treated as i+(++j) ?

Related Questions on C Miscellaneous