第一篇:大連東軟信息學院C語言指針練習2016.docx
一、Make a choice 1.For the same data type pointer variable, which operator can notused in C program.A.+
B.-
C.=
D.== 2.when0<=i<10, for the following statements, which reference is wrong to reference array elements.int a[]={1,2,3,4,5,6,7,8,9,0}, *p, i;p=a;A.*(a+i)
B.a[p-a]
C.p+i
D.*(&a[i])3.when0<=i<10, for the following statements, which reference is wrong to reference the address of array elements.int a[]={1,2,3,4,5,6,7,8,9,0}, *p,i;
p=a;
A.&(a+1)
B.a++
C.&p
D.&p[i] 4.What is the result for the following program? #include
p=a;
*(p+3)+=2;printf(“%d,%dn”,*p,*(p+3));}
A.0,5
B.1,5
C.0,6
D.1,6 5.what is the result for the following program? #include
A.輸出項不合法
B.6
C.8
D.12 6.For the following statements, what’s the value of(p1-p2)? int a[10], *p1, *p2;p1=a;p2=&a[5];
A.5
B.6
C.10
D.沒有指針與指針的減法
7.for this function prototype: void adder(int *ptr,int b);if there are two integers: int op1=2;int op2=4;which statement of function call is right?
A:adder(*op1,op2);B:adder(op1,op2);C:adder(&op1,op2);D:adder(&op1,&op2);8.What does the following program outputs to screen_____ voidToSrn(int *);main(){ int a=8;int *ptr=&a;ToSrn(ptr);} voidToSrn(int *ptr){ printf(“%p”,&a);} A:compile error,can not be run B:8 C:16 D:address of a 9.Assuming int *p,a=4;p=&a;which of the following statements is all means address A:a,p+1 B:&a,*p C:&a,p D:*a,p 10.Assuming inta[10],*p;which one is right A:*p=&a[0];B:*p=a;C:p=a[0];D:p=&a[0];11.Assuming :int a[10],*p=a;which one is the address of a[9] A:a[0]+9 B:&(p+9)C:*(p+9)D:a+9 12.Assuming:
char s1[]=“Hello”,s2[10],*s3=“HelloWorld”,*s4;which one of the following statements is correct? A:strcpy(s1[0],“Morning”);B:s2=“Morning”;C:strcpy(s3,“Morning”);D:strcpy(s4,“Morning”);13.For the following statements,after execution the statement a=p+2;what’s the value of a[0]? float a[3]={1.2,45.6,-23.0};float *p=a;
A.1.2
B.45.6
C.-23.0
D.語句有錯
14.What format speci?ers(in order)should be used in the printf()statement in thefollowing program? Note that in the program the correct format speci?ers have beenreplaced by Z.#include
二、Fill the blank.1.the result of printf(“%sd”,“ab 主站蜘蛛池模板: 日日噜噜噜夜夜爽爽狠狠| 亚洲色无码专区在线播放| 久久99精品久久久久久久清纯| 亚洲中文无码a∨在线观看| 亚洲精品宾馆在线精品酒店| 国产精品偷窥熟女精品视频| 无码人妻精品一二三区免费| 在线观看成人无码中文av天堂不卡| 东京热无码av一区二区| 18无码粉嫩小泬无套在线观看| 无码人妻一区二区三区免费看| 色综合天天综合网国产成人网| 成人片黄网站色大片免费毛片| 999zyz玖玖资源站在线观看| 特级做a爰片毛片免费看| 国产精品无码v在线观看| 亚洲一区二区三区av激情| 亚洲高清国产av拍精品青青草原| 欧美日韩午夜群交多人轮换| 色欲αv一区二区三区天美传媒| 国产97色在线 | 日韩| 亚洲国产日韩欧美综合另类bd| 无遮挡边吃摸边吃奶边做| 人妻无码精品久久亚瑟影视| 国产性猛交╳xxx乱大交| 无码aⅴ在线观看| 曰批全过程免费视频在线观看无码| 日韩精品无码不卡无码| 国产亚洲精久久久久久无码77777| 亚洲第一av导航av尤物| 亚洲 欧美精品suv| 国产精品日本亚洲777| 国产乱子伦农村叉叉叉| 精品无码久久久久久久久久| 五月综合激情婷婷六月| 少妇久久久久久人妻无码| 国产农村黄aaaaa特黄av毛片| 一边做一边喷17p亚洲乱妇50p| 韩国午夜理论在线观看| 成人丝袜激情一区二区| 少妇被粗大的猛烈进出96影院|