#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
what will be the output for the following main() { printf("hi" "hello"); }
Explain what are the different data types in c?
How can I change their mode to binary?
What are the 4 types of unions?
How do we make a global variable accessible across files? Explain the extern keyword?
What is meant by high-order and low-order bytes?
The statement, int(*x[]) () what does in indicate?
What is maximum size of array in c?
Where is c used?
please help me..... please codes and flowchart plz turbo c lang po yan.....please asap response... 3. Make an astrology program. The user types in his or her birthday (month, day, and year as integer), and the program responds with the user’s zodiac sign, horoscope, and other information related to it. If the user’s birth year falls into a leap year, your program should display an appropriate message for it. NOTES: Conditional Statements: it should be with graphics
What does == mean in texting?
What are the valid places to have keyword “break”?
What is the process of writing the null pointer?
Can i use “int” data type to store the value 32768? Why?
Can you pass an entire structure to functions?