#include <stdio.h>
#define COMPUTE(x,y) ((x*x*x) + (y))
int main()
{
int num1 = 100;
int num2 = 10;
printf("%d\n", COMPUTE(++num1, num2));
return 0;
}
The result is undefined in both C and C++, but the behavior is consistent and interesting. The result is in the first comment.compute.c:10: warning: operation on ‘num1’ may be undefined
Attention by http://synsecblog.com/
1071622
ReplyDelete(102*102*103+10)