当前位置: 答题翼 > 问答 > 计算机类考试 > 正文
目录: 标题| 题干| 答案| 搜索| 相关
问题

(7 )有以下程序#include <stdio.h>main (){ int a=1,b=2,c=3,d=0;if (a==1 )if (b!=2 )


(7 )有以下程序

#include <stdio.h>

main ()

{ int a=1,b=2,c=3,d=0;

if (a==1 )

if (b!=2 )

if (c==3 ) d=1;

else d=2;

else if (c!=3 ) d=3;

else d=4;

else d=5;

printf (" %d " ,d ) ;

}

程序运行后的输出结果是 【 7 】 。

请帮忙给出正确答案和分析,谢谢!

参考答案
您可能感兴趣的试题
  • (11 )有以下程序#include &lt;stdio.h&gt;main (){ int a[3][3]={{1,2,3},{4,5,6},{7,8,9}};int

  • (11 )有以下程序#include &lt;stdio.h&gt;main (){ int a[3][3]={{1,2,3},{4,5,6},{7,8,9}};int

  • (7)有以下程序#include &lt;stdio.h&gt;main(){ int x;scanf("%d",&amp;x);if(x&gt;15) printf("

  • 有以下程序#include &lt;stdio.h&gt;main(){ int arr[ ]={1,3,5,7,2,4,6,8},i,start; scanf("%d

  • 以下程序的输出结果是【 14 】#include &lt;stdio.h&gt; #include &lt;stdio.h&gt;#include &lt;st

  • 有以下程序#include &lt;stdio.h&gt;struct st{int x, y, z;} data[2]={3,10,2,20,15,7};main(){