若有定义语句:char s[3][10],(*k)[3],*p;,则以下赋值语句正确的是( )。
A. p=s;
B. p=k;
C. p=s[0];
D. k=s;
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e0346501.html
点击查看答案
有以下程序
#include
void main ( )
{ int a[]={1, 2, 3, 4, 5} ;
int x, y, *p;
p=&a[0];
x=*(p+2);
y=*(p+4);
printf("%d,%d,%d\n", *p, x, y);
}
执行后的输出结果是( )。
A. 1,3,5
B. 1,2,3
C. 1,2,4
D. 1,4,5
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e034651d.html
点击查看答案
运行结果是( )
switch ( ‘B’ )
{case ‘A’:printf("abc");break;
case ‘B’:switch(1)
{case 0:printf("a");break;
case 1;printf("b");break;
default:printf("c");break;
}
default:printf("x");
}
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e0346512.html
点击查看答案
以下正确的描述是()。
A. continue语句的作用是结束整个循环的执行
B. 只能在循环体内和switch语句体内使用break语句
C. 在循环体内使用break语句或continue语句的作用相同
D. 从多层循环嵌套中退出时, 只能使用goto语句
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e034650f.html
点击查看答案
有以下程序
#include
main()
{ char a[30],b[30];
scanf("%s",a);
gets(b);
printf("%s\n %s\n",a,b);
}
程序运行时若输入:
how are you? I am fine<回车>
则输出结果是()。
A. how are you?
B. how
are you? I am fine
C. how are you? I am fine
D. how
are
you?
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6090-c089-2897e0346521.html
点击查看答案
有以下程序
void change(int k[ ]){k[0]=k[5];}
main()
{int x[10]={1,2,3,4,5,6,7,8,9,10},n=0;
while(n<=4) {change(&x[n]);n++;} for(n=0;n<5;n++) printf("%d",x[n]);printf("\n"); }
程序运行后输出的结果是()。
A. 678910
B. 13579
C. 12345
D. 62345
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-5ca8-c089-2897e0346501.html
点击查看答案
下列程序的输出结果是()。
main()
{ double d=3.2; int x,y;
x=1.2; y=(x+3.8)/5.0;
printf("%d \n", d*y);
}
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4920-c089-2897e0346507.html
点击查看答案
有以下程序段
struct st
{int x;int *y;}*pt;
int a[]={1,2},b[]={3,4};
struct st c[2]={10,a,20,b};
pt=c;
以下选项中表达式的值为11的是()。
A. *pt->y
B. pt->x
C. ++pt->x
D. (pt++)->x
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4d08-c089-2897e0346529.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=4,b=5,c=0,d;
d=!a&&!b||!c;
printf("%d\n",d);}
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4920-c089-2897e034650b.html
点击查看答案