10.下列程序段输出的结果是______。
int a=5,b=4,c=3;
if( ) a=b+c,b=2*c;
else a=b-c,b=3*c;a=b+c;
printf( );
A. 9 6
B. 7 3
C. 1 9
D. 4 2
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-37f0-c044-ce3414c8e900.html
点击查看答案
4.设有定义int i;,i为任意偶数时,下列表达式合法且值为真的是______。
A. i/2==0
B. i%2==0
C. i/2.0==0
D. i%2.0==0
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-7e40-c044-ce3414c8e901.html
点击查看答案
3.按照C语言规定的用户标识符命名规则,不能出现在标识符中的是______。
A. 大写字母
B. 下划线
C. 数字字符
D. 连接符
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-2638-c044-ce3414c8e900.html
点击查看答案
8.判断char型变量ch是否为小写字母的正确表达式是______。
A. 'a'<=ch<='z'
B. ('a'<=ch)||(ch<= 'z')
C. ('a'<=ch)&&(ch<='z')
D. ('a'<=ch) and (ch<='z')
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-2e08-c044-ce3414c8e901.html
点击查看答案
18.max函数的功能是求整型数组a中前n个元素中的最大值。下列函数声明语句中错误的是______。
A. int max(int *a,int n);
B. int max(int a[10],int n);
C. int max(int a,int n);
D. int max(int a[ ],int n);
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-4190-c044-ce3414c8e900.html
点击查看答案
8.下面选项中能正确表示“|x|≤21”的C语言表达式是______。
A. -21≤x≤21
B. -21<=x&&x<=21
C. -21<=x||x<=21
D. -21<=x<=21
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-dc00-c044-ce3414c8e900.html
点击查看答案
20.执行以下程序后,输出结果是______。
#include
void fun( )
{
a=23; b=56;
}
void main( )
{
int x=10, y=20;
fun( );
printf( );
}
A. 23,56
B. 56,23
C. 10,20
D. 20,10
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-4578-c044-ce3414c8e901.html
点击查看答案
20.执行以下程序后,输出结果是______。
#include
void fun( )
{
printf( );
a=30; b=40;
}
void main( )
{
int x=10, y=20;
fun( );
printf( );
}
A. 10, 20 30, 40
B. 0, 0, 30 40
C. 0, 0, 10 20
D. 10, 20 10, 20
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-f370-c044-ce3414c8e900.html
点击查看答案
17.设有char s[2][10]={"12","34"};,则数组s占用______个字节。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-43a8-c044-ce3414c8e901.html
点击查看答案
7.设有定义char w;int x;float y;double z;,则表达式w*x+z-y值的数据类型为______。
A. float
B. char
C. int
D. double
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-3020-c044-ce3414c8e901.html
点击查看答案