第一篇:大連東軟信息學院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 主站蜘蛛池模板: 精品无码国产污污污免费| 亚洲人成绝费网站色www| 国产免费不卡午夜福利在线| 无码avav无码中文字幕| 好看的欧美熟妇www在线| 国产精品a免费一区久久电影| 伊人久久大香线蕉av波多野结衣| 日本三级欧美三级人妇视频黑白配| 大地资源中文第3页| 国产精品无码a∨果冻传媒| 久久综合国产乱子伦精品免费| 久久久精品2020免费观看| 欧美成人aaa片一区国产精品| 亚洲国产av无码精品无广告| 中文字幕无码无码专区| 精品丝袜人妻久久久久久| 最新亚洲人成无码www| 日本一道高清一区二区三区| 久久亚洲精品成人av| 亚洲一区二区三区高清在线看| 无码人妻一区二区三区免费n鬼沢| 乱人伦中文字幕在线| 超碰aⅴ人人做人人爽| 久久毛片| 中文字幕无码成人免费视频| 欧美喷潮久久久xxxxx| 免费网站内射红桃视频| 四川丰满少妇被弄到高潮| 少妇下面好紧好多水真爽播放| 免费人妻精品一区二区三区| 午夜福利伦伦电影理论片在线观看| 亚洲国产成人精品无码区蜜柚| 97久久超碰精品视觉盛宴| 国产成人精品日本亚洲成熟| 国产亚洲婷婷香蕉久久精品| 国产av影片麻豆精品传媒| 亚洲精品1卡2卡三卡4卡乱码| 国产av高清无亚洲| 丰满少妇aaaaaa爰片毛片| 欧美顶级少妇做爰hd| 久久夜色撩人精品国产|