#define N 3 #define Y(n) ( (N+1)*n) 则执行语句:z=2 * (N+Y(5+1));后,z的值为

问题描述:

#define N 3 #define Y(n) ( (N+1)*n) 则执行语句:z=2 * (N+Y(5+1));后,z的值为

#define N 3
#define Y(n) ( (N+1)*n)
z
=2 * (N+Y(5+1))
=2 * (N+((N+1)*5+1))//注意由于#define Y(n) ( (N+1)*n) 中n没有用括号括上,所以这里是*5+1,不是*(5+1)
=2 * (3+((3+1)*5+1))
=2 * (3+(4*5+1))
=2 * (3+21)
=2 * 24
=48