单选题已定义下列变量: int n; float f; double df; df=10; n=2; 下列语句正确的是()A f=12.3;B n=df;C df=n=100;D f=df;
单选题
已定义下列变量: int n; float f; double df; df=10; n=2; 下列语句正确的是()
A
f=12.3;
B
n=df;
C
df=n=100;
D
f=df;
参考解析
解析:
暂无解析
相关考题:
设有如下变量定义: double a=3.500000;float b=2.5; int m=2,n=3; 则表达式“(float)(m+n)/2+(int)a%(int)b”的值是( )A.2.5B.3.5C.4.5D.表达式不正确
以下对结构体类型变量的定义中,不正确的是( )A.typedef struct aa { int n; float m; }AA; AA tdl;B.#define AA struct aa AA{ int n; float m; }tdl;C.struct { int n; float m; }aa; struct aa tdl;D.struct { int n; float m, }tdl;
以下对一维实型数组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];
以下对结构体类型变量td的定义中,错误的是 ______。A.typedef struct aaB.struct aa {int n; {int n; float m; float m; }AA; }td; AAtd; struct aa td;C.structD.struct {int n; {int n; float m; float m; }aa; }td; struct aa td;
写出下列程序的运行结果【】。 include void func(double x, int part1, double 写出下列程序的运行结果【 】。include<iostream. h>void func(double x, int part1, double part2){part1=int(x)+500:part2=(x+500-part1)*100;}void main( ){int n;double x, f;x=1001. 0103;func (x, n, f):cout<<"Part 1="<<n<<" , part2="<<f<<end1}
有下列函数定义: fun(float h) { printf("%f,%f\n",h,h*h);) 该函数的类型是( )。A.int类型SX 有下列函数定义: fun(float h) { printf("%f,%f\n",h,h*h);) 该函数的类型是( )。A.int类型B.float类型C.void类型D.函数无类型说明,定义有错
下列的变量定义语句中,合法的是A.float$__ * 5=3.4f;B.byte bl=15789;C.int__abc=3214L;D.double a=Double.MAX__vALUE;
下面程序输出的结果是( )。 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
以下对结构体类型变量td的定义中,错误的是( )。A.typcdef struct aa { int n; float m; } AA; AA td;B.struct aa {int n; float m; } struct aa td;C.struct {int n; float m; } aa; struct aa td;D.struct {int n; float m; }td;
已定义下列变量: int n; float f; double df; df=10; n=2; 下列语句正确的是()A、 f=12.3;B、 n=df;C、 df=n=100;D、 f=df;
假定变量x,f和d的类型分别为int 、float和double。下面表达式的值总是为1的是()A、x==(int)(float)xB、d==(double)(float)dC、f==(float)(double)fD、(f+d)-f==d
单选题对于函数定义: void FUN(int n, double x) { … } 若以下选项中的变量都已定义并赋值,则对函数FUN的正确调用的语句是()。Ak=FUN(x,n);Bvoid FUN(n,x);CFUN(int y,double m);DFUN(10,12.5);
单选题假定变量x,f和d的类型分别为int 、float和double。下面表达式的值总是为1的是()Ax==(int)(float)xBd==(double)(float)dCf==(float)(double)fD(f+d)-f==d