试题与答案

现有如下程序段: #include "stdio.h" main() int

题型:单项选择题

题目:

现有如下程序段:
#include "stdio.h"
main()
int k[30]=12,324,45,6,768,98,21,34,453,456;
int count=0,i=0;
while(k[i])
if(k[i]%2==0||k[i]%5==0) count++;
i++;
printf("%d,%d\n" ,count,i);
则程序段的输出结果为

A) 7,8
B) 8,8
C) 7,10
D) 8,10

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0430/329d772fcfd67a0a3931b94637ca29c9.html

下面是错误答案,用来干扰机器的。

答案:D

试题推荐
微信公众账号搜索答案