問題詳情
33)下面程序的输出结果是#include#includemain(){ char *p1="abc",*p2="ABC",str[50]= "xyz";strcpy(str+2,strcat(p1,p2));printf("%sn",str);}
(A)xyzabcABC
(B)zabcABC
(C)xyabcABC
(D)yzabcABC
(A)xyzabcABC
(B)zabcABC
(C)xyabcABC
(D)yzabcABC
參考答案
答案:C
難度:適中0.5
統計:A(0),B(0),C(0),D(0),E(0)
內容推薦
- 19)下列程序的运行结果是#include "stdio.h"main(){ int x=-9,y=5,z=8;if(x<y) if(y<0)z=0; els
- 1)一、选择题在下列各题的A)、B)、C)、D)四个选项中,只有一个选项是正确的,请将正确的选项涂写在答题卡相应位置上,答在试卷上不得分。软件生命周期中花费费用最多的阶段是(A)详细设计 (
- 32)有以下程序#include void fun(int *a,int n)/*fun函数的功能是将a所指数组元素从大到小排序*/{ int t,i,j;for(i=0;i<n-1;
- 22)以下描述中正确的是(A)由于do-while循环中循环体语句只能是一条可执行语句,所以循环体内不能使用复合语句(B)do-while循环由do开始,用while结束,在while(表达
- 18)若变量已正确定义,有以下程序段i=0;do printf("%d,",i);while(i++);printf("%dn",i);其输出结果是(
- 40)有以下程序#include void fun(char *t,char *s){ while(*t!=0) t++;while((*t++=*s++)!=0);}main(){ cha
- 31)有以下程序#include main(){ int s[12]={1,2,3,4,4,3,2,1,1,1,2,3},c[5]={0},i;for(i=0;i<12;i++) c[
- 21)有以下程序#include main0{ int y=9;for( ; y>0;y--)if(y%3==0) printf("%d",--y);}程序的运行结
- 17)有以下程序段int j;float y;char name[50];scanf("%2d%f%s",&j,&y,name);当执行上述程序段,从键盘上输入55566
- 39)阅读下列程序,则运行结果为#include "stdio.h"fun(){ static int x=5;x++;return x;}main(){ int i,x
內容推薦
- 24)以下数组定义中错误的是(A)int x[][3]={0}; (B)int x[2][3]={{l,2},{3,4},{5,6}}; (C)int x[][3]={{l,2,3},{4,
- 34)以下函数返回a所指数组中最小的值所在的下标值fun(int *a, int n){ int i,j=0,p;p=j;for(i=j;i<n;i++) if(a[i](A)i=p(
- 21)以下程序的输出结果是main(){ int a,i;a=0;for(i=1;i<5;i++){ switch(i){ case 0:case 3:a+=2;case 1:case
- 13)以下对C语言函数的有关描述中,正确的是(A)在C语言中调用函数时,只能把实参的值传给形参,形参的值不能传送给实参(B)C函数既可以嵌套定义又可以递归调用(C)函数必须有返回值,否则不能
- 22)现有如下程序段#include "stdio.h"main(){ int k[30]={12,324,45,6,768,98,21,34,453,456};int
- 14)若函数调用时的实参为变量时,以下关于函数形参和实参的叙述中正确的是(A)函数的实参和其对应的形参共占同一存储单元 (B)形参只是形式上的存在,不占用具体存储单元(C)同名的实参和形参占
- 23)若有以下程序#include int a[]={2,4,6,8};main(){ int i;int *p=a;for(i=0;i<4;i++)a[i]=*p;printf(&q
- 24)有以下程序#include main(){ int i,j,m=55;for(i=1;i<=3;i++)for(j=3;j<=i;j++)m=m%j;printf(&quo
- 草花種植完成後,下列何者錯誤?(A)需馬上澆水(B)需馬上施尿素肥(C)根球裸露部分填補土方(D)草花周邊土方整平
- 25)已知字符′A′的ASCII码值是65,字符变量cl的值是′A′,c2 的值是′D′。执行语句printf("%d,%d",c1,c2-2);后,输出结果是(A)A,
- 26)下列程序是用来判断数组中特定元素的位置所在的。#include #include int fun(int *s, int t, int *k){ int i;*k=0;for(i=0;
- 34)设有定义:char p[]={′1′,′2′,′3′},*q=p;,以下不能计算出一个char型数据所占字节数的表达式是(A)sizeof(p) (B)sizeof(char) (C)
- twice(A)machine (B)invite (C)terrible (D)bitter
- 27)下面程序的文件名为t.exe,在DOS下输入的命令行参数为:t to meet me则程序输出的结果是#include "stdio.h"main(argc,arg
- doubt(A)amount (B)trouble (C)shoulder (D)group
- Jack,you seem in high spirits.--____________We won the match 4-0.(A)Guess what? (B)So what? (C)N
- I walked up to the top of the hill with my feiend, we enjoyed a splendid view of the lake(A)which
- north(A)thunder (B)worthy (C)neither (D)clothes
- 29)以下叙述中错误的是(A)改变函数形参的值,不会改变对应实参的值 (B)函数可以返回地址值(C)可以给指针变量赋一个整数作为地址值 (D)当在程序的开头包含头文件stdio.h时,可以给
- It is not how much we do but how much love we put into what we do______benefits our work most.(A)
- 39)下列程序的输出结果是#include "stdio.h"#define M(x,y) x%ymain(){ int a,m=12,n=100;a=M(n,m);pr
- His first novel good reviews since it came out last month.(A)receives (B)is receviing (C)will rec
- (A) What are you up to this weeked?(B)Don’t mention it.(C)Any other suggestions? (D)Anything I can d
- 30)下面程序的输出结果是#includemain(){ int a[]={1,2,3,4,5,6,7,8,9,0},*p;p=a;printf("%dn",*p+9);