有以下程序段 struct st {int x;int *y,*pt; int a[]={l,2},b[]={3,4}; strct st c[2]={10,a,20,b}; pt=c; 以下选项中表达式的值为11的是()
第1题:
以下程序运行后,输出结果是 #define PT 5.5 #define S(x) PT*x*x #include<stdio.h> main() { int a=1,b=2; printf("%4.1f\n",s(a+b));}
A.49.5
B.9.5
C.22
D.45.0
第2题:
有以下程序段: struct st{int x; int *y; } *pt;int a[]={1,2}, b[]={3,4};struct st c[2]={10,a,20,b};pt=c; 以下选项中表达式的值为11的是( )。
A.*pt->y
B.pt->x
C.++pt->x
D.(pt++)->x
第3题:
有以下程序 #include <stdio.h> struct st { int x,y;} data[2]={1,10,2,20}; main() { struct st *p=data; printf("%d,",p->y); printf("%d\n",(++p)->x); } 程序的运行结果是______。
A.10,1
B.20,1
C.10,2
D.20,2
第4题:
有下列程序段:
struct st
{int x;int*y;}*pt;
int a[]={1,2},b[]={3,4};
stmct st c[2]={10,a,20,b};
pt=c;
下列选项中表达式的值为11的是( )。
A.*pt->y
B.pt->x
C.++pt->x
D.(pt++)->X
第5题:
有下列程序段: struct st {int x;int *y;}*pt; int a[]={1,2},b[]={3,4}; struct st c[2]={10,a,20,b}; pt=c; 下列选项中表达式的值为11的是( )。
A.*pt->y
B.pt->x
C.++pt->x
D.(pt++)->X
第6题:
有以下程序段:

以下选项中表达式的值为11的是( )。
A.++pt一>x
B.pt一>x
C.*pt一>y
D.(pt++)一>x
第7题:
以下程序运行后,输出结果是______。 #define PT 5.5 #define S(x) PT*x*x main() { int a=1,b=2;printf("%4.1 f\n",S(a+b)); }
A.49.5
B.9.5
C.22
D.45
第8题:
有以下类定义: class Point { public: Point(int x=0,int y=0){_x=x; _y=y;} void Move(int x Off, int y Off) {_x+=x Off; _y+=y Off; } void Print() const { cout <<'(' << _x << ',' << _y << ')'<< end 1;} private: int _x,_y; }下列语句中会发生编译错误的是______。
A.Point pt; pr. Print();
B.const Point pt; pt. Print();
C.Point pt; pt. Move(1,2);
D.const Point pt; pt. Move(1,2);
第9题:
以下程序运行后,输出结果是 #define PT 5.5 #define S(x) PT*x*x #include<stdio.h> main() { int a=1,b=2; printf("%4.1f\n",S(a+b));}
A.49.5
B.9.5
C.22
D.45
第10题:
有以下类定义 class Point{ public: Point{int x = 0, int y=0) {_x = x; _y = y;} void Move int xoff, int yoff) {_x +=xoff;_y+=yoff;} void Print() const {cout<<'('<<_x<<','<<_y<<')' << end1;} private: int_x,_y; }; 下列语句中会发生编译错误的是
A.Point pt;pt.Print();
B.const Point pt;pt.Print();
C.Point pt;pt.Move(1, 2);
D.const Point pt;pt.Move(1, 2)
第11题:
*pt→y
pt→x
++pt→x
(pt++)→x
第12题:
++pt->x
pt->x
*pt->y
(pt++)->x
第13题:
以下程序运行后,输出结果是 #define PT 5.5 #define S(x)PT* x * x main() {int a=1,b=2; printf("%4.lf\n",S(a+b); }
A.49.5
B.9.5
C.22
D.45
第14题:
以下程序运行后,输出结果是______。 #include<stdio.h> #define PT 5.5 #difine S(x) PT*x*x main() { int a=1,b=2; printf("%4.1f/n",S(a+b)); }
A.49.5
B.9.5
C.22
D.45
第15题:
有下列程序段: struct st {intx;int*y;}*pt; int a[]={1,2},b[]={3,4}; struct st c[2]={10,a,20,b}; pt=c; 下列选项中表达式的值为11的是( )。
A.*pt->y
B.pt->x
C.++pt->x
D.(pt++)->x
第16题:
执行以下语句段后,xy的值是( )。 int*pt,xy; xy=200; pt=&xy; xy=*pt+30;
A.200
B.170
C.260
D.230
第17题:
现有两张数据表(MySQL数据库)如下:
x_pt_info x_user_info
字段 类型 长度 小数位 字段 类型 长度 小数位
user_id int 11 user_id int 11
pt_group int 11 user_name varchar 20
pt_number decimal 10 2 user_work int 1
描述一下这个SQL语句的作用:
SELECT b.user_id as user_id,b.user_name as user_name,round(sum(a.pt_number),2) as ptnum from x_pt_info a,x_user_info b where
a.user_id=b.user_id and a.pt_group=1 and b.user_work=2 group by a.user_id order by ptnum desc
另外,就你的经验,你觉得该语句是否有改进的余地,如有,请阐述。
第18题:
以下程序运行后,输出结果是 ( ) # include<stdio.h> # define PT5.5 # define S (x)PT* x * x main( ) { int a=1,b=2; printf("%4.1f\n",s(a+b)); }
A.49.5
B.9.5
C.22
D.45
第19题:
以下程序运行后,输出结果是( )。 #include<stdio.h> #define PT 5.5 #define S(x)PT*x*X main { int a=1,b=2: printf("%4.1f\n",s(a+b)); }
A.49.5
B.9.5
C.22.0
D.45.0
第20题:
以下程序的输出结果是 #include<stdio.h> struct st { int x;int *y;}*p; int dt[4]={10,20,30,40}; struct st aa[4]={50,&dt[0],60,&dt[0],60,&dt[0],60,&dt[0],}; main() { p=aa; printf("%d\n",++(p->x));}
A.10
B.11
C.51
D.60
第21题:
有下列程序段: struct St {int x;int *y;)*pt; int a[]={1,2),b[]={3,4); struct st c[2]={10,a,20,b); pt=c; 下列选项中表达式的值为11的是( )。
A.*pt- >y
B.pt- >x
C.+ +pt- >x
D.(pt+ +)->x
第22题:
用指针作函数参数,编程序求一维数组中的最大和最小的元素值。
#define N 10
main()
{ void maxmin(int arr[],int *pt1,int *pt2,int n);
int array[N]={10,7,19,29,4,0,7,35,-16,21},*p1,*p2,a,b;
p1=&a; p2=&b;
maxmin(array,p1,p2,N);
printf("max=%d,min=%d",a,b);
}
void maxmin(int arr[],int *pt1,int *pt2,int n)
{ int i;
*pt1=*pt2=arr[0];
for(i=1;i<N;I++)
{ if(arr[i]>*pt1) (9) ;
if(arr[i]<*pt2) (10) ;
}
}
第23题:
*&x[10]
*(x+3)
*(pt+10)
pt+3