若有以下定义和语句 union date { int i; char c; fioat f;} x; int y; 则以下语句正确的是______。
A.x=10.5;
B.x.c=101;
C.y=x;
D.printf("%d\n",x);
第1题:
若有定义:floatx=3.5,y=3.6;则表达式()的值为6。
A.(int)x+(int)y
B.x+y
C.(int)(x+y)
D.int(x+y)
第2题:
主程序中定义了变量int x=3,y=4;调用函数f(x,&y)后,x,y都等于3,则调用的是以下函数()
A.f(int *a, int b){ *a++; b--;}
B.f(int *a, int b) { (*a)++; b--;}
C.f(int a, int *b){ a++; (*b)--;}
D.f(int *a, int *b) { a++; *b--;}
第3题:
以下对指针定义合法的语句是()
A.int *p=&x=3;
B.int y[5]={1,2,3,4,5},*p=&y;
C.char ch[12]=″Hello World″,*c=ch;
D.char *c,c=‘x’,c=&c;
第4题:
若有定义:int x=3,y=2;float a=2.5,b=3.5;则表达式(x+y)%2+(int)a/(int)b的值为
第5题:
若主函数有变量定义:int x=1 ; double y=2.3 ; 且有合法的函数调用语句f (y , x); 则下列关于函数f的原型声明中一定错误的是 。
A.void f(double, int);
B.int f(int , int);
C.int f(double, double);
D.void f(double, int, int);
第6题:
若有定义int x=3,y=2和float a=2.5,b=3.5,则表达式:(x+y)%2+(int)a/(int)b的值是