1、若a = 1,b = 3,c = 5,d = 4,则执行下面程序段后x的值是( )。if(a < b)if(c < d)x = 1;elseif(a < c)if(b < d)x = 2;elsex = 3;elsex = 6;elsex = 7;(2分)
https://www.shititong.cn/cha-kan/shiti/0001a7aa-d8c1-4a12-c0d6-3f0ad517a300.html
点击查看答案
1、如果需要打开一个已经存在的非空文件“file”进行修改,正确的文件打开语句为( )。(2分)
A. fp = fopen("file", "r");
B. fp = fopen("file", "ab+");
C. fp = fopen("file", "w+");
D. fp = fopen("file", "r+");
https://www.shititong.cn/cha-kan/shiti/0001a7aa-d8c2-1e94-c0d6-3f0ad517a300.html
点击查看答案
1、下列标识符中不合法的是( )。(2分)
A. DQ
B. Name
C. 2Dim
D. LiⱣⱤStone
https://www.shititong.cn/cha-kan/shiti/0001a7aa-d8c1-115d-c0d6-3f0ad517a300.html
点击查看答案
1、要使下面程序输出10个整数,则在划线处()填入正确的数是( )。for(i = 0; i <= () ;)printf("%d\n", i += 2);(2分)
https://www.shititong.cn/cha-kan/shiti/0001a7aa-d8c1-f651-c0d6-3f0ad517a300.html
点击查看答案
1、若有变量定义int x, y=5, *p = &x;则下列能完成x = y功能的是( )。(2分)
A. *p = y;
B. *p = &y;
C. x = *p;
D. x = &y;
https://www.shititong.cn/cha-kan/shiti/0001a7aa-d8c2-05ac-c0d6-3f0ad517a300.html
点击查看答案
1、语句:char ch='\65';,则变量ch的值为( )。(2分)
A. 空
B. 2个字符
C. 3个字符
D. 1个字符
https://www.shititong.cn/cha-kan/shiti/0001a7aa-d8c1-21cf-c0d6-3f0ad517a300.html
点击查看答案
1、若有如下语句:struct {} data[], *p;p = data;则以下对data[]中成员a的引用中,错误的是( )。(2分)
A. data[0]->a
B. data->a
C. p->a
D. (*p).a
https://www.shititong.cn/cha-kan/shiti/0001a7aa-d8c2-656a-c0d6-3f0ad517a300.html
点击查看答案
1、该程序中的for循环执行的次数是( )。(2分)
https://www.shititong.cn/cha-kan/shiti/0001a7aa-d8c1-bbb6-c0d6-3f0ad517a300.html
点击查看答案
1、以下代码段中与语句:k = a > b ? (b > c ? 1 : 0) : 0; 功能等价的是( )。(2分)
A. if((a > b) && (b > c))k = 1;elsek = 0;
B. if((a > b) || (b > c))k = 1;elsek = 0;
C. if(a <= b)k = 0;else if(b <= c)k = 1;
D. if(a > b)k = 1;else if(b > c)K = 1;elsek = 0;
https://www.shititong.cn/cha-kan/shiti/0001a7aa-d8c1-4547-c0d6-3f0ad517a300.html
点击查看答案
1、在代码:while( )中,!e等价于( )。(2分)
A. e == 0
B. e != 0
C. e == 1
D.
E. != 1
https://www.shititong.cn/cha-kan/shiti/0001a7aa-d8c1-6561-c0d6-3f0ad517a300.html
点击查看答案