当变量c的值不为2、4、6时,值也为"真"的表达式是( )。
A. (c==2)||(c==4)||(c==6)
B. (c>=2&& c<=6)||(c!=3)||(c!=5)
C. (c>=2&&c<=6)&&!(c%2)
D. (c>=2&& c<=6)&&(c%2!=1)
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6478-c089-2897e034651e.html
点击查看答案
若给出以下定义:
char x[ ]="abcdefg";
char y[ ]={'a','b','c','d','e','f','g'};
则正确的叙述为( )。
A. 数组x和数组y等价
B. 数组x和数组y的长度相同
C. 数组x的长度大于数组y的长度
D. 数组x的长度小于数组y的长度
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e034651d.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
点击查看答案
若要求从键盘读入含有空格字符的字符串,应使用函数()。
A. getc()
B. gets()
C. getchar()
D. scanf()
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4d08-c089-2897e0346524.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()
{ char x=0xFFFF; printf("%d \n",x--); }
A. -32767
B. FFFE
C. -1
D. -32768
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6090-c089-2897e034650b.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
点击查看答案
设有以下语句
int a=1,b=2,c;
c=a^(b<<2);
执行后,C的值为()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e0346501.html
点击查看答案
有以下程序
main()
{char s[ ]={ "aeiou"},*ps;
ps=s; printf("%c\n",*ps+4);}程序运行后的输出结果是()。
A. a
B. e
C. u
D. 元素s[4]的地址
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-5ca8-c089-2897e0346503.html
点击查看答案
写出下列程序段运行结果()。
unsigned int a=3,b=10;
printf("%d\n",a<<2|b==1);
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6090-c089-2897e0346506.html
点击查看答案