有如下条件表达式,若a=2、b=4、c=5 、d=7则表达式的值为()。a > b ? a : c > d ? c : d
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4920-c089-2897e034650d.html
点击查看答案
有以下程序
#include
# include
char *fun(char *t)
{
char *p=t;
return(p+strlen(t)/2);
}
void main()
{
char *str="abcdefgh";
str=fun(str);
puts(str);
}
执行后的输出结果是( )。
A. efgh
B. abcd
C. bcde
D. cdef
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6c48-c089-2897e0346500.html
点击查看答案
下列语句中,不正确的是( )。
A. static char a[2]={1,2};
B. static char a[2]={ '1', '2'};
C. static char a[2]={ '1', '2', '3'};
D. static char a[2]={ '1'};
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e0346516.html
点击查看答案
以下不合法的数值常量是()。
A. 011
B. 1e1
C. 8.0E0.5
D. 0xabcd
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4d08-c089-2897e034651b.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
点击查看答案
若有定义语句:double a,*p=&a;以下叙述中错误的是()。
A. 定义语句中的*号是一个间址运算符
B. 定义语句中的*号只是一个说明符
C. 定义语句中的p只能存放double类型变量的地址
D. 定义语句中,*p=&a把变量a的地址作为初值赋给指针变量p
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e0346504.html
点击查看答案
有以下程序
#include
void fun(int *p)
{printf(“%d\n”,p[5]);}
main()
{int a[10]={1,2,3,4,5,6,7,8,9,10};
fun(&a[3]);
程序运行后的输出结果是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6478-c089-2897e034650f.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
点击查看答案
有以下程序
main()
{int a=0,b=0,c=0,d=0;
if(a=1) b=1;c=2;
else d=3;
printf("%d,%d,%d,%d\n",a,b,c,d);
}
程序输出()。
A. 0,1,2,0
B. 0,0,0,3
C. 1,1,2,0
D. 编译有错
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-58c0-c089-2897e0346511.html
点击查看答案
若有以下程序段,输出结果是( )。
char s[ ]="\\141\141abc\t";
printf ("%d\n",strlen(s));
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e0346521.html
点击查看答案