#define MAX(x,y) (x) > (y) ? (x) : (y)
main()
{
int i = 10, j = 5, k = 0;
k = MAX(i++, ++j);
printf("%d %d %d", i,j,k);
}
what will the values of i , j and k?
}
Answer Posted / jason
The answer is undefined. It is undefined in C to use the
increment operator more than once in the same expression.
MAX(i++, ++j) expands to:
(i++) > (++j) ? (i++) : (++j)
Which guarantees that either i++ or ++j appears twice in the
expression.
http://blog.emptycrate.com/node/329
Is This Answer Correct ? | 7 Yes | 8 No |
Post New Answer View All Answers
How can I call fortran?
Explain built-in function?
i want to know the procedure of qualcomm for getting a job through offcampus
What are types of structure?
Explain how do you declare an array that will hold more than 64kb of data?
Explain what is the difference between far and near ?
What is pointer in c?
How many types of operator or there in c?
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
why use "return" statement a) on executing the return statement it immediately transfers the control back to the calling program b) it returns the value present in the parentheses return, to the calling program c) a & b d) none of the above
explain what is a newline escape sequence?
What is the most efficient way to store flag values?
What are the types of assignment statements?
Can you mix old-style and new-style function syntax?
Why is python slower than c?