首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
在下面程序运行后,输出结果为 ______。 #include<iostream.h> void count(int x[],int n,int &y){ int k; y=0; for(k=0:k<n;k++)
在下面程序运行后,输出结果为 ______。 #include<iostream.h> void count(int x[],int n,int &y){ int k; y=0; for(k=0:k<n;k++)
admin
2009-01-15
36
问题
在下面程序运行后,输出结果为 ______。 #include<iostream.h> void count(int x[],int n,int &y){ int k; y=0; for(k=0:k<n;k++) if(x[k]<0) y++; } void main(){ int b[]={2,1,-8,-3,7,2,4,6,0,-13}; int x; count(b,10,x); cout<<“x”<<x<<end1; }
选项
A、x=3
B、x=5
C、出错
D、x=0
答案
1
解析
转载请注明原文地址:https://kaotiyun.com/show/6ikp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
以下选项中,当x为大于l的奇数时,值为0的表达式是()。
给定程序MODI1.C中fun函数的功能是:求s=aa…aa-…-aaa-aa-a(此处aa…aa表示n个a,a和n的值在1至9之间)例如a=3,n=6,则以上表达式为:s=333333-33333-3333.333
给定程序中,函数fun的功能是将a和b所指的两个字符串分别转换成面值相同的整数,并进行相加作为函数值返回,规定字符串中只含9个以下数字字符。例如,主函数中输入字符串’’32486’’和’’12345’’,在主函数中输出的函数值为44831。
黑盒测试用例的主要根据是()。
在软件开发中,需求分析阶段产生的主要文档是()。
下列方法中,不属于软件调试方法的是()。
要求通过while循环不断读入字符,当读入字母N时结束循环。若变量已正确定义,以下正确的程序段是()。
以下选项中不属于C语言程序运算符的是
以下关于逻辑运算符两侧运算对象的叙述中正确的是
交换两个变量的值,不允许用临时变量,应该使用下列()位运算符。
随机试题
少年期性意识的最突出的特征是()
下列哪一种情况使梗阻肥厚型心肌病流出道梗阻加重
A.乙酰CoA羧化酶B.HMG-CoA还原酶C.HMG-CoA合成酶D.HMG-CoA硫解酶合成酮体主要的酶
发生MRI失超时,错误的做法是
()又称为人力资本的无形支出。
“戏”字在几千年前的商周钟鼎文中就出现了,意思是指一种祭祀性仪式。秦汉时期,娱乐性表演又称“百戏”,包括乐舞、杂技、魔术、马戏等。后来,娱乐性的玩耍也叫“游戏”,所以“戏”原本有仪式、百戏、游戏的含义。这段话主要是说()。
若某完全二叉树的深度为h,则该完全二叉树中至少有______个结点。
数据的逻辑结构是从逻辑关系上描述数据,它与数据的【 】结构无关。
Whatisamongthereasonswhythemanwantstoreturntheitem?
A.amountedB.appealingC.automaticallyD.epidemicE.existenceF.gainG.imposesH.intermittentI.
最新回复
(
0
)