PROBLEM SET
题库
按难度与知识点筛选,找到适合的练习题。
题目列表
共 67434 题
A48377
以下程序的结果是( )#include"stdio.h"void main(){ unsigned int a=3,b=10; printf("%d\n",a<<2|b>>1);}
电子学会-C-L100
中等
--
A48378
if语句的一般形式可写为if(expr) 语句1;else 语句2;其中,作为条件判断的表达式expr( )
电子学会-C-L100
中等
--
A48379
若有定义int a=1,b=3,c=5,d=4,x;则执行以下程序段后x的值为( )if (a < b) { if (c < d) { x = 1; } else if (a < c) { if (b < d) { x = 2; } else { x = 3; } } else { x = 6; }} else { x = 7;}
电子学会-C-L100
中等
--
A48380
有如下程序void main() { int a = 2, b = -1, c = 2; if (a < b) { if (b < 0) { c = 0; } else { c++; printf("%d\n", c); } }}该程序的输出结果是( )
电子学会-C-L100
中等
--
A48381
以下选项中与if(a==1)a=b; else a++;语句功能不同的switch语句是( )
电子学会-C-L100
中等
--
A48382
设有定义:int a=1,b=2,c=3;,以下语句中执行效果与其它三个不同的是( )
电子学会-C-L100
中等
--
A48383
运行下面程序的输出结果为( )#define X 5#define Y X+1#define Z Y*X/2int main(void){ int a; a=Y; printf("%d,%d\n",Z,--a);}
电子学会-C-L100
中等
--
A48384
以下程序的输出结果是( )#define MAX(x,y) (x)>(y)?(x):(y)void main(){ int a=5,b=2,c=3,d=3,t; t=MAX(a+b,c+d)*10; printf("%d\n",t);}
电子学会-C-L100
中等
--
A48385
运行以下的程序,输出结果为( )#define M 3*2#define N M+2#define S(r) M*N*r/2#include<stdio.h>void main(){ int a=4; printf("%d",S(a));}
电子学会-C-L100
中等
--
A48386
运行以下程序的输出结果为( )#include"stdio.h"#define R 1+2#define S(r) r*r#define V(r) S(r)*Rvoid main(){ int r1=1+2; printf("%d",V(r1));}
电子学会-C-L100
中等
--
A48387
以下程序的输出结果是( )#include<stdio.h>#define f(x) x*xvoid main(){ int a=6,b=2,c; c=f(a+b)/f(a-b); printf("%d\n",c);}
电子学会-C-L100
中等
--
A48388
设有如下枚举类型定义; enum language {Basic=3,Assemble,Ada=100,COBOL,Fortran}; 则枚举量Fortran的值为( )
电子学会-C-L100
中等
--
A48389
若有以下说明和定义union dt{int a;char b;double c;}data;以下叙述中,错误的是( )
电子学会-C-L100
中等
--
A48390
设有如下说明typedef struct{int n;char c;double x;}STD;则以下选项中,能正确定义结构体数组并赋初值的语句是( )
电子学会-C-L100
中等
--
A48391
设有以下定义:union data{int d1;float d2;}demo;则以下叙述中,错误的是( )
电子学会-C-L100
中等
--
A48392
对于如下枚举类型定义,枚举量Pasica的值为( ) enum language{Basic=3,Assembly=6,Ada=100,COBOL,Pasica}
电子学会-C-L100
中等
--
A48393
根据下面的结构体类型及其结构数组的定义,值等于'A'的表达式是( ) struct season { char name[10]; int day; }; struct season s[4]={"Spring",90," Summer",91,"Autumn",92," Winter",92};
电子学会-C-L100
中等
--
A48394
运行以下程序的输出结果为( )#include<stdio.h>void main(){ enum color {Black=1,Red,Blue,Green}; enum color c1,c2; c1=Red;c2=Blue; printf("%d,%d\n",c1,c2);}
电子学会-C-L100
中等
--
A48395
设有以下定义:struct node{ int data; struct node *next;}*p;则以下的语句中正确的是( )
电子学会-C-L100
中等
--
A48396
以下叙述中正确的是( )
电子学会-C-L100
较易
--