Login

Username:

Password: 

Join us Now |  Forgot Password? | Forgot UserName?

Blogs


#include<conio.h>

#include<stdio.h>

void main()

{

int i=5;

clrscr();

printf("%d %d %d",i++,++i,i--);

getch();

}

Ans the above question with description?



Your comment


Ritik rastogi
10-Jul-15
5 5 4
Nikita
19-Jul-15
5 5 4 the assignment starts from right to left. So first will be i-- will be evaluated. As in case of post decrements, the value which is printed is 5 and later on it becomes 4. Next i is incremented so it will become 5 & later is post incremen so its 5
Poornima
06-Jan-15
5 7 7 would be the out put cause in 1st i++ it will post the value of i then increments the value of i by 1, in this i become 6,next ++i is preincrement the value of i now i become 7 and then it is printed,next i-- post the value to print 7, then decrmt i