选择题:现有如下程序段 #include"stdio.h" main() {intk[30]={12,324,45,6,768,98,21,34,453,45

题目内容:
现有如下程序段

#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




参考答案:

下列程序执行后的输出结果是 voidfunc1(inti); voidfunc2(inti); charst[]="hello,frie

下列程序执行后的输出结果是 voidfunc1(inti); voidfunc2(inti); charst[]="hello,frie

查看答案

有以下程序#include <stdio.h>struct ord{ int x,y; } dt[2]={1,2,3,4};main(){ stru

有以下程序#include <stdio.h>struct ord{ int x,y; } dt[2]={1,2,3,4};main(){ stru

查看答案

设有宏定义 :#define IsDIV(k,n) ((k%n==1)?1:0) 且变量 m 已正确定义并赋值 ,则宏调用 :Is

设有宏定义 :#define IsDIV(k,n) ((k%n==1)?1:0) 且变量 m 已正确定义并赋值 ,则宏调用 :Is

查看答案

在深度为7的满二叉树中,叶子结点的个数为( )。 A.32B.31C.64D.63

在深度为7的满二叉树中,叶子结点的个数为( )。 A.32B.31C.64D.63

查看答案

( 14 )在 Visual FoxPro 中,下面关于 属性、 事件 、 方法叙述错误的是A ) 属性用于描述对象的状态

( 14 )在 Visual FoxPro 中,下面关于 属性、 事件 、 方法叙述错误的是A ) 属性用于描述对象的状态

查看答案