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

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

如果定义 float a[10], x; 则以下叙述中正确的是()

A.语句a = &x; 是非法的

B.表达式a + 1是非法的

C.三个表达式a[l]、*(a + l)、*&a[l]表示的意思完全不同

D.表达式*&a[l]是非法的,应该写成*(&(a[1]))


参考答案和解析
B 定义语句floata[10],x;以后,数组名a表示了数组元素的首地址,是常量在程序中不能更改,因此选项A是的描述是正确的。而指向运算符和取址运算符,是互反运算符优先级相同,*&a[1]和*(&a[1])含义相同。
更多 “如果定义 float a[10], x; 则以下叙述中正确的是()A.语句a = x; 是非法的B.表达式a + 1是非法的C.三个表达式a[l]、*(a + l)、*a[l]表示的意思完全不同D.表达式*a[l]是非法的,应该写成*((a[1]))” 相关考题
考题 设有定义: float x=123.4567; ,则执行以下语句后的输出结果是 【 6 】 。printf("%f\n",(int)(x*100+0.5)/100.0);

考题 设已有定义: float x; 则以下对指针变量 p 进行定义且赋初值的语句中正确的是A)float *p=1024;B)int *p=(float)x;C)float p=x;D)float *P=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){ …… }

考题 设已有定义:float x;则以下对指针变量p进行定义且赋初值的语句中正确的是( )。A.float *p=1024;B.int *p=(float x);C.float p=x;D.float *P=x;

考题 若有以下说明和定义语句,则变量w在内存中所占的字节数是 【19】 。union aa {float x; float y; char c[6]; };struct st{ union aa v; float w[5]; double ave; } w;

考题 已有定义:float x=5.5;则表达式:x=(int)x+2的值为。

考题 若各选项中所用变量已正确定义,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){……}

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

考题 若定义了以下函数: void f(……) { …… *p=(double *)malloc(10 * sizeof(double)); …… } p是该函数的形参,要求通过p把动态分配存储单元的地址传回主调函数,则形参p的正确定义应当是( )A.double *pB.float **pC.double **pD.float *p

考题 以下定义语句中正确的是( )。A.char a='A ' b='B';B.float a=b=10.0;C.int a=10, *b=a;D.float *a, b=a;

考题 设已有定义:floatx;则以下对指针变量p进行定义且赋初值的语句中正确的是()。 A.int*p=(floatx)B.floatp=&xC.float*p=1024D.float*P=&x

考题 设有定义:float x=123.4567;,则执行以下语句后的输出结果是[ ]。printf("%f\n"(int)(x*100+0.5)/100.1;

考题 以下对一维实型数组a的正确定义的是______。A.float a(10);B.int n=10;float a[n];C.int n;float a [n]; scanf("%d",n);D.#define SIZE 10 float a[SIZE];

考题 若有定义float X=1.5;int a=1,b=3,C=2;,则正确的switch语句是( )。A.B.C.D.

考题 设有定义int x; float y; , 则10+x+y值的数据类型是A.intB.doubleC.floatD.不确定

考题 若有定义:float x=1.5;int a=1,b=3,c--2;,则正确的switch语句是( )。 .A.AB.BC.CD.D

考题 l设已有定义:floatx;,则以下对指针变量p进行定义且赋初值的语句中正确的是( )。A.float*p=S l设已有定义:floatx;,则以下对指针变量p进行定义且赋初值的语句中正确的是( )。A.float*p=&x;B.int*p-(float)x;C.float p=&x;D.float*p=1024;

考题 若有定义:float x=1.5;int a=1,b=3,c=2;则正确的switch语句是( )。

考题 设有定义:float x=123.4567;则执行以下语句后的输出结果是( )。A.123.460000B.123.456700C.123.450000D.123

考题 若各选项中所有变量已正确定义,函数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.float sum(x,y) {float x,y;……}B.float sum(float x,float y); {……}C.float sum(float x,float y) {……}D.float sum(floatx,floaty) {……}

考题 若有如下定义: union aa {int n; char c[9]; float x;}a,b,c; 则下列叙述中不正确的是( )A.union aa是定义的共用体类型B.a,b,c是定义的共用体类型名C.n、c[9]和x是共用体的成员名D.a,b,c是定义的共用体变量名

考题 若下列各选项中所有变量已正确定义,函数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) {......}

考题 以下定义语句中正确的是()A、char a=’A’ b=’B’;B、float a=b=10.0;C、int a=10,*b=a;D、float *a,b=a;

考题 关于float数定义正确的是() A、float f=1.0B、float=x0x0687C、float=-5D、float=1.8f

考题 单选题如果定义有double,x;float,y;int,m,则表达式x*y-m的类型为()A doubleB floatC intD short

考题 单选题设已有定义:float x;则以下对指针变量p进行定义且赋初值的语句中正确的是(  )。A float *p=x;B int*p=(float)x;C float p=x;D float *p=1024;

考题 单选题若有定义:float x=1.5; int a=1,b=3,c=2; 则正确的switch语句是(  )。