meili 发表于 2022-10-27 16:05:40

【阅读下面程序写出执行或输出结果:#defineM(x,y,z)x*y+zmain(){inta=1,b=2,c=3;printf(quot;%dnquot;,M(a阅读下面程序写出执行或输出结果:#defineM(x,y,z)x*y+zmain(){inta=1,b=2,c=3;printf(quot;%dnquot;,M(a+b,b+c,c+a));}】

<p>问题:【阅读下面程序写出执行或输出结果:#defineM(x,y,z)x*y+zmain(){inta=1,b=2,c=3;printf(quot;%dnquot;,M(a阅读下面程序写出执行或输出结果:#defineM(x,y,z)x*y+zmain(){inta=1,b=2,c=3;printf(quot;%dnquot;,M(a+b,b+c,c+a));}】
<p>答案:↓↓↓<p class="nav-title mt10" style="border-top:1px solid #ccc;padding-top: 10px;">李宇明的回答:<div class="content-b">网友采纳  输出12  宏不是函数,只是逐字替换,它会把M(a+b,b+c,c+a)变成1+2*2+3+3+1,就是12了
页: [1]
查看完整版本: 【阅读下面程序写出执行或输出结果:#defineM(x,y,z)x*y+zmain(){inta=1,b=2,c=3;printf(quot;%dnquot;,M(a阅读下面程序写出执行或输出结果:#defineM(x,y,z)x*y+zmain(){inta=1,b=2,c=3;printf(quot;%dnquot;,M(a+b,b+c,c+a));}】