【单选题】【消耗次数:1】
假设pl、p2是STL中的Iist缚器上的迭代器,那么以下语句不符合语法的是()
p1++;
p1--;
p1+=1;
intn=(pl==p2);
参考答案:
复制
纠错
相关题目
【单选题】 指针变量p1、p2类型相同,要使p2、p1指向同一变量,哪一个语句是正确的()。
①  p2=*p1;
②  p2=**p1;
③  p2=p1;
④  p2=*p1;
【简答题】 #include stdio.hint main(){char a[]=I love China!,b[20],*p1,*p2;p1=a;p2=b; for(;*p1!=\0p1++,p2++)*p2=*p1; *p2=\0// printf(string a is:%s\n printf(string b is:%s\n return 0;}以上程序运行结果为string b is:[填空1]。
【单选题】 有以下变量说明,下面不正确的赋值语句是() int a=5,b=10,c; int ?p1=&a,?p2=&b;
①  ?p2=b;
②  p1=a;
③  p2=p1;
④  c=?p1?(?p2)。
【判断题】 p1和p2都指向同一个数组元素时,可以执行p1-p2或p1+p2。
①  正确
②  错误
【简答题】 #include stdio.hint main(){void swap(int *p1,int *p2);int a,b;int*pointer_1,*pointer_2;printf(please enter a and b:scanf(%d,%d,a,pointer_1=pointer_2=if(ab) swap(pointer_1,pointer_2);printf(%d,%d\n,a,b);return 0;} void swap(int *p1,int *p2){int temp;temp=*p1;*p1=*p2;*p2=temp;}若输入5,9,则输出为[填空1]。
【简答题】 #include stdio.hint main(){void swap(int *p1,int *p2);int a,b;int*pointer_1,*pointer_2;printf(please enter a and b:scanf(%d,%d,a,pointer_1=pointer_2=if(ab) swap(pointer_1,pointer_2);printf(%d,%d\n,a,b);return 0;} void swap(int *p1,int *p2){int * temp;temp=p1;p1=p2;p2=temp;}若输入5,9,则输出为[填空1]。
【单选题】 设X,Y独立同分布P(X=-1)=P(Y=-1)=1/2,P(X=1)=P(Y=1)=1/2则
①  X=Y
②  P(X=Y)=0
③  P(X=Y)=1/2
④  P(X=Y)=1
【判断题】 已知:int *p1, *p2= 由此可知变量a的类型是:int *。
①  正确
②  错误
【单选题】 若X1, X2独立,且分布率为P(Xi= -1)=P(Xi= 1)= 1/2(i = 1,2),那么下列结论正确的是
①  X1=X2
②  P(X1=X2)=1
③  P(X1=X2)= 1/2
④  以上都不正确
【单选题】 设有定义:intn1=0,n2,*p=&n2,*q=&n1;,以下赋值语句中与n2=n1;语句等价的是()
①  *p=*q;
②  p=q;
③  *p=n1
④  p=*q;
随机题目
【单选题】 28. If it ____ fine tomorrow, we will go skating.
①  will be
②  is to be
③  is going to be
④  is
【单选题】 She doesn’t speak ____ her friend, but her written work is excellent.
①  as well as
②  so often as
③  so much as
④  as good as
【单选题】 21. Thinking that you know ____ in fact you don’t is a disastrous mistake.
①  what
②  that
③  when
④  however
【单选题】 Industrial demand on fuel is ____
①  on rise
②  in rise
③  in the rise
④  on the rise
【单选题】 I really appreciate ____ to help me, but I am sure that I can manage by myself.
①  you to offer
②  that you offer
③  your offering
④  that you are offering
【单选题】 Half of the money____ your brother. ?
①  belong to ?
②  belong ?
③  belongs to ?
④  belongs?
【单选题】 25. A pilot should be responsible ____ the safety of all the passengers on board.
①  against
②  for
③  at
④  with
【单选题】 After ten years, all these youngsters became____.
①  grown-up
②  grown-ups
③  growns-ups
④  growns-up
【单选题】 We’ll go out as soon as I’ve ____ the kitchen.
①  sent for
②  cleaned up
③  done with
④  worked out
【单选题】 “I haven’t read ____ of the last four chapters, so I know little about them.”
①  something
②  some
③  any
④  anything