0 votes 0 votes #include <stdio.h> int main() { int i = 3; int j; j = sizeof(++i + ++i); printf("i=%d j=%d\n", i, j); return 0; } (a) i=4 j=4 (b) i=3 j=4 (c) i=5 j=4 (d) the behavior is undefined Programming in C programming-in-c output interview + – Desert_Warrior asked May 16, 2016 Desert_Warrior 2.7k views answer comment Share Follow See 1 comment See all 1 1 comment reply Desert_Warrior commented May 16, 2016 reply Follow Share Plz explain line number 6. also other variations of it. 0 votes 0 votes Please log in or register to add a comment.
Best answer 2 votes 2 votes Answer is i=3 j=2 and if int size is 4bytes then i=3 j=4 sizeof operator doesn't evaluate the expression it just replace variable with its type so ++i is not evaluated. http://stackoverflow.com/questions/8225776/why-does-sizeofx-not-increment-x shivanisrivarshini answered May 16, 2016 • selected May 16, 2016 by Desert_Warrior shivanisrivarshini comment Share Follow See all 0 reply Please log in or register to add a comment.