单项选择题
对下面程序描述正确的一项是 (每行程序前面的数字表示行号)
1 main()
2 {
3 float a[3]={0.0};
4 int i;
5 for(i=0;i<3;i++)scanf('%d',&a[i]);
6 for(i=1;i<3;i++)a[0]=a[0]+a[i];
7 printf('%f\n',a[0]);
8 }
A.没有错误
B.第3行有错误
C.第5行有错误
D.第7行有错误
A.0};
B.没有错误
C.第3行有错误
D.第5行有错误
E.第7行有错误
点击查看答案
<上一题
目录
下一题>
热门
试题
单项选择题
设有如下定义: struck sk { int a; float b; } data; int *p; 若要使P指向data中的a域,正确的赋值语句是A.p=&a; B.p=data.a; C.p=&data.a; D.*p=data.a;
A.p=&a;
B.p=data.a;
C.p=&data.a;
D.*p=data.a;
点击查看答案
多项选择题
在大体积混凝土施工中,常用()等方法减少水泥用量。
A.改善骨料级配
B.降低水灰比
C.掺加混和料
D.掺加外加剂
E.提高施工水平
点击查看答案&解析
相关试题
The main idea of the story is tha...
When we dream,().
Which of the following is true?(...
Why do some people often dream abo...
If the patient is rational and pos...