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

现有如下程序段 #include stdio.h main() { int k[30]={12 324 45 6 768 98 21 34 453 456}; i


现有如下程序段#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

参考答案
您可能感兴趣的试题
  • 现有如下程序段 include"stdio.h" main() {intk[30]={12,324,45,6,768,98,21,34,453,45

  • 现有如下程序段 include"stdio.h" main() {inta[5][6]={23,3,65,21,6,78,28,5,67,25,4

  • 现有如下程序段,则程序段的输出结果为【16】。 #include"stdio.h" intfun() {staticintk; " />