网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

下列语句段中,正确的是( )。

A.street { int x; float y; int a[2]; unsigned b[3]; char name[ 10]; };

B.struct stu { unsigned a[3]; unsigned b[4]; }x; int *p=& x.a;

C.stmct stu { int a; float x[4]; }y={1,1.0}; float data=y.x;

D.struct nd { int a,b; unsigned c[2]=5; };


参考答案

更多 “ 下列语句段中,正确的是( )。A.street { int x; float y; int a[2]; unsigned b[3]; char name[ 10]; };B.struct stu { unsigned a[3]; unsigned b[4]; }x; int *p= x.a;C.stmct stu { int a; float x[4]; }y={1,1.0}; float data=y.x;D.struct nd { int a,b; unsigned c[2]=5; }; ” 相关考题
考题 下列定义变量的语句中错误的是A)int _int;B)double int_;C)char For;D)float US$;

考题 若有以下定义和语句union data{ int i; char c; float f; } x;int y;则以下语句正确的是A)x=10.5;B)x.c=101;C)y=x;D)printf("%d\n",x);

考题 若各选项中所用变量已正确定义,函数 fun 中通过 return 语句返回一个函数值,以下选项中错误的程序是A)main(){ …… x=fun(2,10); …… }float fun(int a,int b){ …… }B)float fun(int a,int b){ …… }main(){ …… x=fun(i,j); …… }C)float fun(int,int);main(){ …… x=fun(2,10); …… }float fun(int a,int b) { …… }D)main(){ float fun(int i,int j);…… x=fun(i,j); …… }float fun(int a,int b){ …… }

考题 下列程序段不会发生二义性的是_。 A.int fun(double p){…;} float fun(float p){…;} int x; x=fun(0);B.int fun(float p){…;}float fun(unsigned p){…;} int x; x=fun(0);C.int fun(int i,int j=2){…;}float fun(int i){…;} coutfun(5);D.int fun(int i=2,int j=2){…;} int fun(int *p){…;} coutfun(5);

考题 下列定义变量的语句中正确的是( )。A)int _int; B)double 3int_;C)char for; D)float US;

考题 已经语句int m=10;则下列表示引用的表示中正确的是()。A.int x=m;B.int y=10;C.int x=m;B.int y=10;C.int z;D.float t=8m;

考题 下列语句段中,正确的是( )。A.struct{int x;float y;int a[2];unsigned b[3];char name[10];};B.struct stu{unsigned a[3];unsigned b[4];}x;int*p=x.a;C.struct stu{int a;float x[4];}y={1,1.0};float data=y.x;D.struct nd{int a,b;unsigned c[2]=5;};

考题 若各选项中所用变量已正确定义,fun()函数中通过return语句返回一个函数值,下列选项中错误的程序是( )。A.main() {……x=fun(2,10);……} float fun(int a,int b){……}B.float fun(int a,int b){……} main() {……x=fun(i,j);……}C.float fun(int,int); main() {……x=fun(2,10);……} float fun(int a,int b){……}D.main() {float fun(int I,intj); ……x=fun(i,j);……} float fun(int a,int b){……}

考题 已知语句int m=10;则下列引用的表示中正确的是A.int x=m;B.int y=10;C.int z;D.float t=m;

考题 设有下列说明语句: strcut str {int x;float y;char z;}st; 则下列的叙述中不正确的是( )。A.00001111B.11111101C.00000010D.11000000

考题 #includestruct Worker{char name[15] ; //姓名int age; //年龄float pay; //工资};void main(){Workerx ={“wangfong",46,2650};Worker y,*p;y=x;p=coutpay*2}输出结果:

考题 以下函数原型说明正确的是________。 A. float add(int x, int y) ;B. int add(int x;int y) ;C. char add( x,y) ;D. int add(char x[ ] [ ]) ;

考题 执行下列程序段,结果是includevoid main( ){int x=40; char y='C'; int n;?n=(x char y='C'; int n; ? n=(x0) xff) (y>'B') ; cout < < n;}A.0B.1C.2D.3

考题 下列表示引用的方法中,( )是正确的。 已知:int m=10:A.int x=m;B.int y=10;C.int ZD.float t=m;

考题 若定义下列结构体,结构体变量p的出生年份赋值正确的语句是( )。 struct st { int x; int y; int z; } struct worker { char name[20]; char sex; struct st birth; }p;A.x=1987B.birth.x=1987;C.p.birth.x=1987;D.p.x=1987;

考题 switch(c) 语句中c可以是int, long, char, float, unsigned int 类型。( )

考题 有以下定义和语句,则sizeof(a.share)的值是( )。struct date{ unsigned int day;unsigned int mouth;unsigned int year;union{int share1;float share2;}share;}a;

考题 若各选项中所有变量已正确定义,函数fun中通过return语句返回一个函数值,以下选项中错误的程序是______。A.mam() {…… x=fun(2,10); ……} fioat fun(int a,int b) { ……}B.float fun (int a,int b) {……} main() {…… x=fun(i,j); ……}C.float fun (int int); main() {…… x=fun(2,10); ……} float fun (int a,int b){ ……}D.main() { float fun (int i, int j); …… x=fun(i,j); ……} float fun (int a,int b){ ……}

考题 下列语句段中,正确的是( )。A.struct {int x; float y; int a[2]; unsigned b[3]; char name[10]; };B.structstu { unsigneda[3]; unsigned b[4]; }x; int*p=x.a;C.struc tsu { int a; float x[4]; }y={1,1.0}; floatdat a=y.x;D.stmct nd {int a,b; unsigned c[2]=5; };

考题 已经有“语句intm=10;”则下列表示引用的表示中正确的是( )。A.int&x=m;B.int&y=10;C.int&z;D.float&t=8m;

考题 下面程序输出的结果是( )。 include using namespace std; int test(int n1 下面程序输出的结果是( )。 #include<iostream> using namespace std; int test(int n1,int n2) {return n1 +n2;} float test (int f1,float f2){return f1-f2;} float test(float x,float y){return(x+y)/2;} float test(float x,int y){return(x+y)*2;} void main(){ int a1=10; float a2=2.5f; cout<<test(a1,a2); }A.12.5B.7.5C.6.25D.25

考题 若下列各选项中所有变量已正确定义,函数fun通过return语句返回一个函数值,以下选项中错误的程序是( )。A.main( ) {...... x = fun(2,10);......} float fun(int a, int b){......}B.float fun( int a,int b){......} main( ) {......x = fun(i,j);......}C.float fun(int, int); main( ) {......x=fun(2,10);......} float fun(iht a, int b){......}D.main( ) { float fun(int i, int j); ...... x = fun(i,j);......} float fun(int a,int b) {......}

考题 有以下程序段int j; float y; char name[50];scanf(“%2d%f%s”,j,y,name);当执行上述程序段是,从键盘输入55566 7777abc后,y的值为( )。A.55566.0B.566.0C.7777.0D.566777.0

考题 下面的函数声明中,()是“void BC(int a, int b);”的重载函数A、 int BC(int x, int y);B、 void BC(int a, char b);C、 float AA(int a, char b);D、 int BC(int a, int b=0);

考题 以下C语言语句中,正确的是()A、unsigned int a[2*3];B、char s[N+1];C、double f[];D、float b[4]={1,2,3,4,5};

考题 在C语言中下列变量定义和赋值错误的是()。A、int i,j=20;B、char c="c";C、float f=1+2;D、int x,y;x=y=10;

考题 单选题下面的函数声明中,()是“void BC(int a, int b);”的重载函数A  int BC(int x, int y);B  void BC(int a, char b);C  float AA(int a, char b);D  int BC(int a, int b=0);