+ 1
#include<stdio.h> #define MAN(x, y) ((x)>(y)) ? (x):(y); int main() { int i=10, j=5, k=0; k = MAN(++i, j++); printf("%d, %d,
what is the output
2 odpowiedzi
+ 1
12, 6, 12
Your code will be processed to:
k = (++i) > (j++) ? (++i) : (j++);
So 'i' will be incremented twice (during comparing and getting result). 'j' will be incremented once (during comparing)
+ 1
What's the output? #include<stdio.h>
#define MAN(x, y) ((x)>(y)) ? (x):(y);
int main()
{ int i=10, j=5, k=0; k = MAN(++i, j++); printf("%d, %d, %d\n", i, j, k);
return 0; }