若有以下程序段 doublex=5.16894; printf(%f\n,(int)(x*1000+0.5)/(double)1000); 则程序段的
若有以下程序段 doublex=5.16894; printf(%f\n,(int)(x*1000+0.5)/(double)1000); 则程序段的输出结果是
A.5.175000
B.5.169000
C.5.170000
D.5.168
若有以下程序段 doublex=5.16894; printf(%f\n,(int)(x*1000+0.5)/(double)1000); 则程序段的输出结果是
A.5.175000
B.5.169000
C.5.170000
D.5.168
第1题
若有以下函数首部intfun(doublex[10],int.cn)则下面针对此函数的函数声明语句中正确的是
A.intfun(double,int);
B.intfun(double*x,intn);
C.intfun(double*,int*);
D.intfun(doublex,int*n);
第2题
若有以下程序段 intr=8; printf(%d\n,r>>1); 输出结果是
A.8
B.4
C.16
D.2
第3题
有以下程序 include<stdio.h> doublef(doublex); main() {doublea:0;inti; for(i=0;i<30;i+=10)a+=f((double)i); printf(%5.of\n,a); } doublef(doublex) {returnx*x+1;} 程序运行后的输出结果是
A.401
B.500
C.503
D.1404
第4题
若有以下程序段 charstr[4][12]={aa,bbb,ccccc,d),*strp[4]; inti; for(i=0;i<4;i++)strp[i]=str[i];不能正确引用字符串的选项是
A.strp
B.str[0]
C.strp[3]
D.*strp
第5题
以下程序的执行结果是__。
#include<iostream.h>voidfunc(int);voidfunc(double);voidmain()
{
doublea=88.18;func(a);intb=97;func(b);}voidfunc(intx){
cout<<x<<endl;}
voidfunc(doublex){
cout<<x<<",";}
第6题
A.++(p->n)
B.(*p).n
C.p->n++
D.p->n
第7题
若有以下程序段,则选项中值为2的是()。 struCt a{int n,*next;}; int x=1,y=2,z=3; struct a s[3],*p=s; S [0].next=&x;s[1].next=&V;S[2].next=&z;
A.*(p++)一>next
B.*(p)一>next
C.(*p).next
D.(p++)一>next
第8题
A.(p++)->m
B.*(p++)->m
C.(*p).m
D.*(p)->m
第9题
若程序中定义了以下函数: double myadd(double a,double b) {return (a+b);} 并将其放在调用语句之后,则在调用之前应该对该函数进行说明,以下选项中错误的说明是
A.double myadd(doublea,b);
B.double myadd(double,double);
C.double myadd(doubleb,double a);
D.double myadd(doublex,double y);
第10题
若有以下说明和定义: union dt { int a; char b; double c;} data; 以下叙述中错误的是()。
A.data的每个成员起始地址都相同
B.变量data所占的内存字节数与成员c所占字节数相等
C.程序段:data.a=5; printf("%f\n",data.c);输出结果为5.000000
D.data可以作为函数的实参