1、对嵌套if语句的规定是else总是与( )配对。(2分)
A. 之前最近的尚未配对的if
B. 最前面的if
C. 第一个if
D. 缩进位置相同的if
https://www.shititong.cn/cha-kan/shiti/0001a7aa-d8c1-5a18-c0d6-3f0ad517a300.html
点击查看答案
1、链表不具有的特点是( )。(2分)
A. 不必事先估计所需空间
B. 所需空间与线性长度成正比
C. 插入、删除不需要移动元素
D. 可随机访问任意元素
https://www.shititong.cn/cha-kan/shiti/0001a7aa-d8c2-1bff-c0d6-3f0ad517a300.html
点击查看答案
1、若k为整型变量,则下面while循环执行的次数为( )。k = 10;while(k >= 5)k = k - 1;(2分)
https://www.shititong.cn/cha-kan/shiti/0001a7aa-d8c1-50ee-c0d6-3f0ad517a300.html
点击查看答案
1、设a为整型变量,不能正确表达数学关系:10<a<15的C语言表达式是( )。(2分)
A. 10<a<15
B. a == 11 ||a == 12 || a == 13 || a == 14
C. a > 10 && a < 15
D. !(a = 15)
https://www.shititong.cn/cha-kan/shiti/0001a7aa-d8c1-1754-c0d6-3f0ad517a300.html
点击查看答案
1、设x、y、z均为int型变量,则执行以下语句后x、y、z的值为( )。x=1; y=0; z=2; y++&&++z||++x;(2分)
A. 2、1、2
B. 2、1、3
C. 2、0、3
D. 2、2、3
https://www.shititong.cn/cha-kan/shiti/0001a7aa-d8c1-415a-c0d6-3f0ad517a300.html
点击查看答案
1、如下程序运行时,从键盘上输入由数字组成的字符串,该程序的功能是( )。#include int main(void) {char ch[5];int j;int s = 0;printf("Enter a numeral string\n");gets( );for(j = 0; ch[j] > '\0'; j++)s = 10 * s + ch[j] - '0';printf("%d\n", s);return 0;}(2分)
A. 将数字字符串ch转换成十进制数
B. 将字符数组中的大写字母转换成小写
C. 求字符数组长度
D. 将字符数组中的数字转换对应的字母
https://www.shititong.cn/cha-kan/shiti/0001a7aa-d8c2-00c6-c0d6-3f0ad517a300.html
点击查看答案
1、若有如下程序:#define N 2#define M N + 1#define NUM 2 * M + 1int main( ) {int i;for( )printf( );return 0;}
https://www.shititong.cn/cha-kan/shiti/0001a7aa-d8c1-b9a7-c0d6-3f0ad517a300.html
点击查看答案
1、在定义int a[][]; 后,数组a中的第10个元素是( )。设a[][]为第一个元素。(2分)
A. a[1][4]
B. a[2][4]
C. a[2][5]
D. a[1][5]
https://www.shititong.cn/cha-kan/shiti/0001a7aa-d8c1-ee84-c0d6-3f0ad517a300.html
点击查看答案
1、C程序编译时,程序中的注释部分( )。(2分)
A. 参加编译,并会出现在目标程序中
B. 不参加编译,也不会出现在目标程序中
C. 不参加编译,但会出现在目标程序中
D. 参加编译,但不会出现在目标程序中
https://www.shititong.cn/cha-kan/shiti/0001a7aa-d8c1-62ea-c0d6-3f0ad517a300.html
点击查看答案
1、给定函数原型:int f(int x, int y); 则下列函数调用正确的是( )。(2分)
A. int n, a = 0, b = 1;n = f(int a, int b);
B. int n, a = 0,b = 1;n = int f(x, y);
C. int n = 1 ,a = 0, b = 1;n = f(a, n);
D. int n;n = f();
https://www.shititong.cn/cha-kan/shiti/0001a7aa-d8c1-9d5a-c0d6-3f0ad517a300.html
点击查看答案