Code:
void main() { int i=2; printf("%d %d",++i,++i) getch(); }
but in my opinion the ans should be 3 3
plz explain why ans 4 3 is comming........ ..
void main() { int i=2; printf("%d %d",++i,++i) getch(); }
printf("%d %d, ++i; ++i) <--- second ++i is evaluated first
printf("%d %d, i++, i++)
if (++i) etc...
if (++i == --i) etc...
if (++i) etc...
if (++i == --i) etc...
printf( "%d %d", ++i, ++i);
i = 2; i = ++i;
printf("%d%d\n", ++i, --i);
printf("%d", ++i); printf("%d\n", --i);
Comment