首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有以下程序: #include<stdio.h> int fun(int*k) {int b=0; b=*k+b: return(B);} main() {int a[10]={1,2,3,4,5,6,7,8},i
有以下程序: #include<stdio.h> int fun(int*k) {int b=0; b=*k+b: return(B);} main() {int a[10]={1,2,3,4,5,6,7,8},i
admin
2011-06-10
53
问题
有以下程序: #include<stdio.h> int fun(int*k) {int b=0; b=*k+b: return(B);} main() {int a[10]={1,2,3,4,5,6,7,8},i; for(i=2;i<4;i++){printf("%d",fun(&a
));} printf("\n"); } 程序运行后的输出结果是( )。
选项
A、10 12
B、8 10
C、3 4
D、10 28
答案
C
解析
转载请注明原文地址:https://kaotiyun.com/show/9xPp777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
以下关于函数过程的叙述中,正确的是()。
fun()函数的功能是首先对a所指的N行N列的矩阵,找出各行中的最大的数,再求这N个最大值中的最小的那个数作为函数值返回,请填空。 #include<stdio.h> #defineN100 intfun(int(*a)[
有以下程序:#includemain(){charc;while((c=getchar())!=’?’)putchar(--c);}程序运行时,如果从键盘输入Y?N?,则输
以下程序运行后的输出结果是【 】。main() {intx=10,y=20,t=0; if(x==y)t=x;x=y;y=t printf("%d,%d\n",x,y); }
有以下程序: int a=3; main( ) { int s=0; { int a=5;s+=a++;} s+=a++; printf("%d\n",s); } 程序运行后的输出结果是
程序中头文件typel.h的内容是: #define N 5 #define M1 N*3 程序如下: #include"typel.h" #define M2 N *2 main( ) { int i; i=M1+M2; pr
有以下程序: #include<string.h> main( ) { char *p="abcde\0ghjik\0"; printf("%d\n",strlen(p) ); } 程序运行后的输出结果是
有以下程序: main( ) { int aa[4][4]={ {1,2,3,4},{5,6,7,8},{3,9,10,2},{4,2,9,6} }; int i,s=0; for(i=0;i<4;i++) s+=aa[i][1]; pr
以下程序中函数reverse( )的功能是将a所指数组中的内容进行逆置。 void reverse(int a[ ],int n) { int i,t; for(i=0;i<n/2;i++) { t=a[i];a[i]=a[n-1-i];
若要说明一个类型名STP,使得定义语句STP s;等价于char *s;,以下选项中正确的是
随机试题
Largecompaniesneedawaytoreachthesavingofthepublicatlarge.Thesameproblem,onasmallerscale,facespracticallye
突触间隙去甲肾上腺素消除的主要方式是
噬菌体的特性不包括( )
A.16~18℃B.18~20℃C.20~22℃D.22~24℃E.24~26℃手术室室内温度宜
《中华人民共和国建筑法》中规定的申请领取施工许可证的条件中不包括:
根据《担保法》的规定,下列担保中保证人的有保证主体资格的是( )。
Inthefallof1985,Iwasabright-eyedgirlheadingofftoHowardUniversity,aimingatalegalcareeranddreamingofsitting
为推进社会主义核心价值体系建设,某网站开设“思想道德论坛”,引起网友关注。论坛中呈现的以下话题引发了网友们的热议。——网友声音:市场经济呼唤道德诚信近年来,食品药品等一些领域安全事故频发,扰乱了市场秩序,严重危及人民群众生命健康。对
在资本主义制度下,资本家与劳动者之间的关系是()
Poetrydoesn’tmattertomostpeople.Onehastowonderifpoetryhasanyplaceinthe21stcentury,whenmusicvideosandsat
最新回复
(
0
)