第一篇:大連東軟信息學院大一上 電子工程 c語言-作業.doc第一次,第二周
4.Create a program that uses escape sequence “ to print favorite quote.#include
main()
{
clrscr();
printf(“”Just do myself.“");
}
5.Create a program that uses escape sequence to print the following structure c:cygwinhomeadministrator.#include
main()
{
clrscr();
printf(”C:cygwinhomeadministrator“);
}
6.Create a program that uses escape sequence to print the following directory structure c:cygwinhomeadministrator.#include
main()
{
clrscr();
printf(”ttt*nnntt*tt*nnnt*tttt*nnn*tttttt*nnnt*tttt*nnntt*tt*nnnttt*“);
}
7.Create a calendar program using the current month.#include
main()
{
clrscr();
printf(”SuntMontTuetWedtThutFritSatn“);
printf(”1t2t3t4t5t6t7n“);
printf(”8t9t10t11t12t13t14n“);
printf(”15t16t17t18t19t20t21n“);
printf(”22t23t24t25t26t27t28n“);
printf(”29t30");
}
第二篇:大連東軟信息學院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 主站蜘蛛池模板: 国产成人精品午夜2022| 色噜噜狠狠色综合成人网| av无码人妻无码男人的天堂| 国产成人午夜不卡在线视频| 999成人精品视频在线| 久久中文精品无码中文字幕下载| 在线看午夜福利片国产| 亚洲日本高清一区二区三区| 精品无码成人网站久久久久久| 91精品少妇高潮一区二区三区不卡| 成人麻豆日韩在无码视频| 成人网站免费在线观看| 国产精品美女一区二区三区| 在线观看的av网站| 无码无遮挡在线观看免费| 无套熟女av呻吟在线观看| 丁香狠狠色婷婷久久综合| 国产成人无码www免费视频播放| 亚洲av无码1区2区久久| 国产精品天干天干在线观看澳门| 久久永久免费人妻精品我不卡| 国产精品免费看久久久无码| 久久一日本道色综合久久| 久久综合九色欧美综合狠狠| 狠狠色噜噜狠狠狠777米奇888| 狠狠的干性视频| 国内精品伊人久久久久影院麻豆| 无码日韩精品一区二区免费暖暖| 国产在线无码一区二区三区| 少妇无码av无码专线区大牛影院| 国内精品久久人妻无码妲己| 中文字幕人成人乱码亚洲电影| 综合亚洲伊人午夜网| 欧美黑人乱大交| 久久精品蜜芽亚洲国产av| 国产探花在线精品一区二区| 亚洲综合色区另类小说| 亚洲色av天天天天天天| 国产偷窥盗摄一区二区| 久久精品一本到东京热| 欧美乱人伦人妻中文字幕|