以下程序的输出结果是()。
union myun
{ struct
{ int x, y, z; } u;
int k;
} a;
main()
{ a.u.x=4; a.u.y=5; a.u.z=6;
a.k=0;
printf("%d\n",a.u.x);}
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-58c0-c089-2897e034650d.html
点击查看答案
下列程序的输出结果是()。
int b=2;
int func(int *a)
{ b += *a; return(b);}
main()
{ int a=2, res=2;
res += func(&a);
printf("%d \n",res);
}
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6090-c089-2897e0346507.html
点击查看答案
请读程序:
main()
{ int a=1,b=2;
printf("%d\n",a=a+1,a+6,b+2);}
则上面程序的输出结果是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e034651d.html
点击查看答案
有以下程序
#include “stdio.h”
void main()
{ int x, y, z;
x=y=1;
z=x++,y++,++y;
printf("%d,%d,%d\n",x,y,z);
}
程序运行后的输出结果是( )。
A. 1,2,3
B. 1,3,2
C. 2,3,1
D. 3,1,2
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6c48-c089-2897e0346512.html
点击查看答案
下面程序的输出结果是()。
#include
#include
main()
{ char *p1="abc",*p2="ABC",str[50]= "xyz";
strcpy(str+2,strcat(p1,p2));
printf("%s\n",str);}
A. xyzabcABC
B. zabcABC
C. xyabcABC
D. yzabcABC
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-58c0-c089-2897e034650a.html
点击查看答案
有以下程序
main()
{int i,t[][3]={9,8,7,6,5,4,3,2,1};
for(i=0;i<3;i++) printf("%d",t[2-i][i]);
}
程序执行后的输出结果是()。
A. 7 5 3
B. 3 5 7
C. 3 6 9
D. 7 5 1
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-58c0-c089-2897e0346512.html
点击查看答案
若有以下程序片段:
char str[ ]="ab\n\012\\\"";
printf("%d",strlen(str));
上面程序片段的输出结果是 ( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e0346520.html
点击查看答案
有以下程序
#include
void main()
{
int a[][2]={10,20,30,40,50,60},(*p)[2];
p=a;
printf("%d\n",*(*(p+2)+1));
}
程序运行后的输出结果是 ( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e034650e.html
点击查看答案
以下所列的各函数首部中,正确的是()。
A. void play(var a:integer,var b:integer)
B. void play(int a,b)
C. void play(int a,int b)
D. sub play(a as integer,b as integer)
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e0346522.html
点击查看答案
有以下程序
fun(int x)
{ int p;
if(x==0||x==1) return(3);
p=x-fun(x-2);
return p;
}
main()
{ printf("%d\n",fun(7)); }
执行后的输出结果是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6c48-c089-2897e0346510.html
点击查看答案