首页 > 计算机等级考试
题目内容 (请给出正确答案)
[主观题]

有下面程序段#include"stdio.h"#include"string.h"main(){char a[3][20]={{"china"};{"isa"},{bi

有下面程序段 #include"stdio.h" #include"string.h" main() { char a[3][20]={{"china"};{"isa"},{bigcountry!"}}; char k[100]={0},*p=k; int i; for(j=0;j<3;i++) { p=strcat(p,a[i]);} i=strlen(p); printf("%d\n",i);} 则程序段的输出结果是

A.18

B.19

C.20

D.21

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“有下面程序段#include"stdio.h"#includ…”相关的问题
第1题
有以下程序:#include <stdio, h>void sum(int a[ ] ){a[0]=a[-1] +a[1];}main (){int a[10] = {

有以下程序:#include <stdio, h>void sum(int a[ ] ){ a[0]=a[-1] +a[1];}main (){ int a[10] = {1,2,3,4,5,6,7,8,9,10}; sum(&a[2]); prinff("% d \n",a[2]); }程序运行后的输出结果是()。

A.6

B.7

C.5

D.8

点击查看答案
第2题
有以下程序:#include <stdio, h>main(){int m =0256,n =256;printf("% o % o \n" ,m,n); 程序

有以下程序: #include <stdio, h> main() { int m =0256,n =256; printf("% o % o \n" ,m,n); 程序运行后的输出结果是() 。

A.0256 0400

B.0256 256

C.256 400

D.400 400

点击查看答案
第3题
有以下程序:#include <stdio, h>main(){char a1 ='M',a2 ='m'; printf("%c\n",(a1,a2));} 以下

有以下程序:#include <stdio, h>main(){ char a1 ='M',a2 ='m'; printf("%c\n",(a1,a2)); } 以下叙述中正确的是()。

A.程序输出大写字母M

B.程序输出小写字母m

C.格式说明符不足,编译出错

D.程序运行时产生出错信息

点击查看答案
第4题
有以下程序: #include <stdio, h>int a =2;int f(int n){ static int a: 3;intt=0;if(n%2){ stat

有以下程序: #include <stdio, h>int a =2;int f(int n){ static int a: 3; int t=0; if(n%2){ static int a=4;t+ =a++;} else { static int a=5;t+ :a++;} return t + a + +;main (){ int s=a,i; for(i=0;i<3;i++)s + =f(i); prinff("% d \n" ,s); }程序运行后的输出结果是()。

A.26

B.28

C.29

D.24

点击查看答案
第5题
有以下程序: #include <stdio, h>void swap1 (int c0[],int e1[] ){intt;t = c0[0]; c0[0]: c1 [

有以下程序: #include <stdio, h>void swap1 (int c0[],int e1[] ){ int t; t = c0[0]; c0[0]: c1 [0] ; c1 [0] = t;}void swap2(int * c0,int * c1){ int t; t= *c0; *c0= *c1; * c1 =t;}main(){ inta[2]={3.5}.b[2]={3,5}; swapl(a,a+1) ;swap2(&b[0],&b[1]); printf("% d %a %d %d \n" ,a[0] ,a[1] ,b[0] ,b[1] ); }程序运行后的车出结果是()。

A.3 5 5 3

B.5 3 3 5

C.3 5 3 5

D.5 3 5 3

点击查看答案
第6题
以下程序的输出结果是 ______。#include<stdio>main(){int a=200;#define a 100printf("%d",a) ;

以下程序的输出结果是 ______。 #include<stdio> main() {int a=200; #define a 100 printf("%d",a) ; #undefa printf("%d",a) ; }

A.200 100

B.100 100

C.100 200

D.200 200

点击查看答案
第7题
下列程序的执行结果是()。#include<stdio h>main{ int a,b,c;a=b=2,c=I;c=(a++)-1;printf(

下列程序的执行结果是()。

#include<stdio h>

main

{ int a,b,c;

a=b=2,c=I;

c=(a++)-1;printf("%d,0Ad",a,c);

c+=-a+++(b);printf("%d,%d",a,c);

)

A.3,14,1

B.3,14,2

C.2,04,1

D.2,14,1

点击查看答案
第8题
下面程序段的输出为 #include"stdio.h" main() {printf("%d\n",12<<2);} A.0

下面程序段的输出为

#include "stdio.h"

main()

{ printf("%d\n",12<<2);}

A.0

B.47

C.48

D.24

点击查看答案
第9题
阅读下面程序段,则执行后的结果为#include "stdio.h"main(){ int m=4,n=2,k;k=fun(m,n);printf("%d\n",k);}fun(int m,int n){ return(m*m*m-n*n*n);}

A.64

B.8

C.56

D.0

点击查看答案
第10题
阅读下面程序,则程序段的功能是#include"stdio.h"main(){ int c[]={23,1,56,234,7,0,34},i,j,t;f

阅读下面程序,则程序段的功能是 #include"stdio.h" main() { int c[]={23,1,56,234,7,0,34},i,j,t; for(i=1;i<7;i++) { t=c[i];j=i-1; while(j>=0 && t>c[j]) { c[j+1]=c[j];j--;} c[j+1]=t;} for(i=0;i<7;i++) printf("%d",c[i]); putchar('\n');}

A.对数组元素的升序排列

B.对数组元素的降序排列

C.对数组元素的倒序排列

D.对数组元素的随机排列

点击查看答案
退出 登录/注册
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改