#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?
}
Answers were Sorted based on User's Feedback
Answer / 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 |
#ifdef TRUE int I=0; #endif main() { int j=0; printf("%d %d\n",i,j); }
What is a union?
What will be the outcome of the following conditional statement if the value of variable s is 10?
What does & mean in scanf?
Define a structure to store roll no, name and marks of a student. Using the structure of above write a ‘C’ program to create a file “student.dat”. There must be one record for every student in the file. Accept the data from the user.
Can you please explain the difference between strcpy() and memcpy() function?
why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above
please give me answer with details #include<stdio.h> main() { int i=1; i=(++i)*(++i)*(++i); printf("%d",i); getch(); }
Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.
What is && in c programming?
how to add two numbers without using arithmetic operators?
printf("%d",(printf("Hello")); What it returns?