阶段一C语言题附答案

阶段一C语言题附答案

ID:83410430

大小:12.13 MB

页数:124页

时间:2023-07-14

上传者:灯火阑珊2019
阶段一C语言题附答案_第1页
阶段一C语言题附答案_第2页
阶段一C语言题附答案_第3页
阶段一C语言题附答案_第4页
阶段一C语言题附答案_第5页
阶段一C语言题附答案_第6页
阶段一C语言题附答案_第7页
阶段一C语言题附答案_第8页
阶段一C语言题附答案_第9页
阶段一C语言题附答案_第10页
资源描述:

《阶段一C语言题附答案》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

ஹᓫ⌱⚪.......................................................................1ஹ⌱⚪......................................................................12ஹ⚪......................................................................14ஹᑨ⚪......................................................................34ஹ⚪......................................................................35ஹᑖ᪆⚪..................................................................47ஹ⚪......................................................................57ஹᓫ⌱⚪1.breakᐵ%&ᙠ()*+,᪀./01ᵨ3(C)A.for*:B.switch*:C.if*:D.while*:2.DᙠᨬFGᨬHᵨḄ᣸K+LMN3(A)A.FO᣸B.ᑈQ᣸C.⌱R᣸D.᜜T᣸3.UxWyᙳZbool[\]ᑣx&yZ`ḄᩩbL(A)஺A.deᙳZ`B.ᐸ.gZ`C.deᙳZᎷD.ᐸ.gZᎷ4.i☢Ḅ(gkᶇ&/0mZnᦪḄpqrs(C)஺A.voidB.intC.newD.long5.ᎷxaZg᦮sᦪz{]ᑣᐗ}a[4]Ḅ&⁚ᙢᙬZA஺A.a+4B.a+8C.a+16D.a+326.CnᦪstrstrḄ0L3(A)A.B.K&C.&D.,&7.ᙠ.ᵨᩭmZ[\{Ḅᔠ+Ḅ᪗L—c_oAstaticB23_blCstu_ltD#338.iᑡKK¡ᨬ¢ḄL—d_஺A&&B+=C>=D!9.§¨charstrl,str2[10];⌱R¬Ḅ®ᐭ*:_d__஺Ascanf("%s%c",&strl,str2);Bscanf("%s%s",&strl,str2);Cscanf("%c%c",&strl,stফ³Dscanf("%c%s",&strl,str2);10.ᨵgµᦪzs[3][4],ᐸ¶2·¶3ᑡᐗ}Ḅ¬⊤¹L__oA*(*(s+2)+3)B*(s+2)+3Cs[2,3]Ds[3][2]11.i¬Ḅ»¼Lߟd_oAcontinue*:ḄmᵨL¾¿᦮gÀÁḄ᡻·஺Bcontinue*:ḄmᵨL,ÃÄÅÀÁḄ᡻·஺Ccontinue*:Wbreak*:Æᙠswitch*:.1ᵨ஺Dbreak*:ḄmᵨL,ÃÄÅÀÁḄ᡻·஺12.ᎷxxWyZdoubles]ᑣ⊤ÇÈx=2,y=x+3/2ḄÊL_a_஺A)3.500000B)3C)2.000000D)3.000000

113.C*ËÌx]ᦪz{ÍÎÏÐ]dWÑÒÓÏÔÕḄᦪÖ×⌴ÙÈL_d_oAᵨᡝᢣx×⌴ÙÈBÜ×⌴CᓫᔣÊ×⌴Dᙢᙬ×⌴14.Þᨵißà*:structSTUDENT{intnum;charname[10];floatcj;}al={1001,liming”]97.5},*p=&al;/¬Ḅ®á*:L_d__oAprintf("%F']al.cj);Bprintf("%f",p->cj);Cprintf("%â,(*p).cj);Dprintf("%f",*p.cj);15.§¨inta;ᑣÑᢣ┐[\¬ḄßàWäåᓄL_d__oAint*p=a;Bintp=a;Cintp=&a;Dint*p=&a;16.Þᨵxçintaa[8]³ᑣi⊤ÇÈ./0è⊤ᦪzᐗaa[1]ḄᙢᙬḄLߟa_஺A)&aa[0]+lB)&aa[l]C)&aa[0]++D)aa+117.Þᨵi☢ḄßàWxç]ᑣsizeof(structaa)ḄÊL_c<,structaa{doubler2;intrl;floatr3;unionuu{charul[5];longu2[2];}ua;}mya;A)30B)29C)24D)2218.ÞᨵixçW*::_c_»ints[4][5],(*ps)[5];ps=s;ᑣÑsᦪzᐗ}Ḅ¬êᵨÓÈLA)ps+1B)*(ps+3)C)ps[0][2]D)*(ps+1)+3191.ᎷUëឋ⊤ḄZn,ᑣᙠᨬíîïi]ᑈQ᣸◤⌕ḄÅᦪZ—d_oA)lo2nB)n2C)O(nl.5)D)n(n-1)/2g20.ᙠßà*:int*f();.,᪗fè⊤ḄLߟd_0A)gᵨòᢣᔣ᦮sᦪÖḄᢣ┐[\B)gᵨòᢣᔣµᦪzḄ·ᢣ┐C)gᵨòᢣᔣnᦪḄᢣ┐[\D)gpqÊZᢣ┐sḄnᦪ{21.ëឋ⊤1=(a1,a2,a3,…ai,…an),iᑡß+¬ḄL—d-஺A)ógᐗ}ÆᨵgôõöbWôõ÷bB)ëឋ⊤.øù⌕ᨵgᐗ}C)⊤.úᐗ}Ḅ᣸ᑡûüýLᵫÿᑮᜧᡈᵫᜧᑮD)◀ᐗᨬᐗ᜜ᐸᐗᨵᨵ22.!"structlink{intdata;strucklink*ncxt;}a,b,c,*p,*q;

2#$ab'()ᨵ᝞+ᡠ-Ḅ/⊤1᪀:abdatanextdatanextI5|+-|9|\0|IPcdatanextI7|tqᢣ┐pᢣᔣ#$a,qᢣᔣ#$c஺ᑣRSTcUᐭᑮab'(WXᡂZḄ/⊤Ḅ[\HI:___C_oA)a.next=c;c.next=b;B)p.next=q;q.next=p.next;C)q->ncxt=p->next;p->ncxt=&c;D)(*p).ncxt=q;(*q).ncxt=&b;23.bᨵcd[\"ߟb_0typedefstruct{intn;charch[8];}PER;ᑣ☢yz{|}ḄIA)PERI1᪀~#$B)PERI1᪀~C)typedefstructI1᪀~D)structI1᪀~24.ᨵcd"inta[4]={0,0};ᑣ☢|}ḄyzI"—dA)ᦪHaḄᐗᑮ0B)ᦪHaḄᜧ1C)ḄᦪRḄ$⊤Ḅ◀ᡠᖪᦪIḄᜧD)ᨵᐗa[0]L0]a[0][1]ᑮᐸᐗᙳᑮ}Ḅ25.yz|}ḄI"ߟd_oA)Tdefineif!ᵨᡝ᪗B)Tdefine!ᵨᡝ᪗RTif!ᵨᡝ᪗C)Tif!ᵨᡝ᪗RTdefine!ᵨᡝ᪗D)defineifR!ᵨᡝ᪗26.!"inta=511,*b=&a;,ᑣprintf("%d

3",*b);Ḅ£¤1¥"_d_.A)¦}B)aḄᙢᙬC)512D)51127.ª«{while®¯Ḅ®¯°ᦪI"_d—஺main஺{inti=0;while(i<10){if(i

4A)1B)10C)6D)¶®¯R}°ᦪ28.ᨵª«"#includevoidf(intn);main஺{voidf(intn);f(5)µ}voidf(intn){printf("%d

5",n);}ᑣyz{|}ḄI"_c_oA)ᙠ¸¹ᦪ{º¹ᦪf»¼cdᑣRᙠ¸¹ᦪ{|}½ᵨ¹ᦪfB)ᙠ¸¹ᦪº¹ᦪf»¼cdᑣᙠ¸¹ᦪᐸḄᐸ¾¹ᦪ{|}½ᵨ¹ᦪfC)º¿Àª«ÁÂÃÄÅÆ-¤┯ÈÉ"Æ-ººf¹ᦪÊËcdD)¹ᦪf¦ÌÍᡠᵨvoidÎᐸ!¦29.ᨵ᝞!structperson{charname[9];intage;};structpersonclass[10]={"John",17,"paul",19,"Mary"J8,"Adam”,16,};᪷ÐÀz!R£¤ÑÒMḄ[\I"—d_oA)printf(n%c

6M,class[3].name);B)printf("%c

7",class[3].name[1]);C)printf(n%c

8H,class[2].nameEl]);D)printf(H%c

9u,class[2].name[0]);30.ᙠC[Ó{XÔḄÕḕ×ØI"—a_oA)autoB)registerC)staticD)extern31.⌕ᡭÛAÜÀuserÝÞßabc.txtḄᦻáᦻ»¼âஹᑏåæ☢ᔠè⌕éḄ¹ᦪ½ᵨI"—b_oA)fopenf*A:\user\abc.txtnr11)B)fopen(HA:\\user\\abc.txtH,Hr4-M)C)fopcn("A:\uscr\abc.txt","rb")C)fopcn("A:\\uscr\\abc.txtH,nwH)32.ᨵ!:char*st"howareyou"µᑡª«ë{|}ḄI"_a—஺A)chara[11],*p;strepy(p=a+l,&st]4]);B)chara[11];strepy(++a,st);C)chara[11];strepy(a,st);D)chara,*p;strepy(p=&a[1],st+2);33.ᑡᵨ¿printf¹ᦪḄìᑴÑ${î⊤“ðᔣñò”Ḅô!Ñ$I"_j஺A)\bB)\tC)\vD)\f34.b#$nfloatmintᑣRõöÎn{Ḅᦪ÷ᶇᦪùúûüû»¼ýþÿᐭḄ⊤—a_oA)n=(n*100+0.5)/100.0B)m=n*l00+0.5,n=m/l00.0

10C)n=n*100+0.5/100.0D)n=(n/100+0.5)*100.035_.x,yzintx=3,y=4,z=5,ᑣ☢⊤0Ḅ⊤:d_oA)x&&yB)x<=yC)x||++y&&y-zD)!(x)36.ᨵ_c_ointk=10;whUe(k=0)k=k-l;ᑣ☢!"ḄA)while#$᡻&10'B)#$(▲#$C)#$*+,-'./᡻&D)#$*+,᡻&-'37.0⊤for(⊤1;;⊤3)2ᳮ4ߟb_oA)for(⊤1;0;⊤3)B)for(⊤1;1;⊤3)C)for(⊤1;⊤1;⊤3)D)for(⊤1;⊤3;⊤3)38.5ᨵ᝞+,intx=3;do{printf("%d

11",x-=2);}while(!(-x));ᑣ7☢—b_0A)89Ḅ1B)89Ḅ1-2C)89Ḅ30D):#$39.5aint;<᡻&=+,a='A'+1.6>,ᑣ!"Ḅ?—a_஺A)aḄABCB)aḄCDC)/ᐕFABCDGHD)aḄAB‘A'ḄASCIIH71஺40.5ᨵIJ+,inta,b,c,*d=&c>,ᑣK!"LMNOᐭPQ᦮ᦪᑖUVWaஹbஹcḄ+,-a_0A)scanf("%d%d%d",&a,&b,d);B)scanf("%d%d%d",&a,&b,&d);C)scanf("%d%d%d”,a,b,d);D)scanf("%d%d%d",a,b,*d);41._c_ᔠZḄᵨᡝ]^_᪗aB஺A)2bB)floatC)foo-99D)_3242.5aint;ᐸ3,ᑣ᡻&c⊤a+=a-=a*adaḄߟc_oA)-3B)9C)-12D)643.0efḄ^_⊤-c_/BᔠC+g+Z஺structnode{intlen;char*pk;

12}x={2,"ri^it"},*p=&x;A)p->pkB)*p.pkC)*p->pkD)*x.pk44.ᨵint[]={10,ll,12}*p=&a[0]>ᑣ᡻&c*p++>*p+=l>dai/k]m[2]Ḅo'_c—஺aA)10,11,12B)11,12,12C)10,12,12D)11,11,1245.⊤sizeof("hello")pstrien("hello")ḄᑖU:_c—஺A)6,6B)5,5C)6,5D)5,646.Ꮇ^rs=ft⊤u᪀ᢣ┐pஹqᑖUᢣᔣ᝞zᡠ|ḄuDᑣf2f}qᡠᢣuDLt⊤ᑤ◀next=q->next;B)(*p).next=(*q).next;free(q);C)q=(*q).next;(*p).ncxt=q;frcc(q);D)q=q->next;p->ncxt=q;p=p->next;frce(p);47.—d-ᔠZḄᵨᡝ]^_᪗aB஺Aஹb-bBஹfloatCஹDஹ_isw48._c-xஹy^_ᡂfloat;

13':_a_oA.1B.2C.3D.455.ᨵIJinta=3,ᑣ⊤g1&&--a>1cdaḄ¨—B_oA.02B.03C.12D.1356.xyint;Ḅᦪᑣᑡ⊤Ḅ/7Ḅ—c_o

14A.(x=y=6,x+y,x+1)B.(x=y=6,x+y,y+1)C.(x=6,x+1,y=6,x+y)D.(y=6,y+l,x=y,x+1)57.externᐵMAḄ¼ᵨ½¾¿(D)A.mJ᜜ÁtÂB.mJ᜜ÁᜮᦻÄᵨC.mJÅᵨ᡽ÇC+++,D.mJ᜜ÁᡂᕒÉᦪஹᡂᕒᦪÊ஺58.for(intx=0,y=o;!x&&y<=5;y++)+,᡻&#$Ḅ'ᦪ(c)0B)5C)6D)('ᦪ59.ὃ⇋ÉᦪØvoidtcst(inta,intb=7,char="*"),☢ḄÉᦪàᵨáe/ᔠZàᵨḄ(c)A)test(5);B)test(5,8);C)test(6,"#n)D)test(0,0."*");60.C+++gḄã+,,0ebreakcontinueIZ!"Ḅ(c)+,æ¨ᵨp#$*+,æ¨ᵨp#$*eak(ᩩã+,continue/continueḄãé/êJ"ë᧕íîï⚪f⚪ñ89uò⚪1.⌱ó!"Ḅ&uò_#includc"stdio.h"mainQ{inta=l,b=10;do{a++;b-=a;b->}while(b>0);printfCa=%d,b=%dn,a,b);)Aa=2,b=-lBa=2,b=-2Ca=4,b=-lDa=4,b=-22.fḄ89uò:-b_omainQ{intb[3][3]={0,1,2,0,1,2,0,1,2},i,j,t=l;for(i=0;i<3;i++)for(j=i;jv=i;j++)t=t+b[i][b[j]O]];printf("%d

15n,t);)A)3B)4C)1D)93.'()*Ḅ,-./01ߟc_omainQ

16{inta=5,b=4,c=6,d9printf(H%d

17n,d=a>b?(a>c?a:c):b);A)5B)4C)6D)4.'()*Ḅ,-./01_a_஺main஺{inta=O,i9for(i=l;i<5^++){switch(i){case0:case3:a+=2;case1:case2:a+=3;default:a+=5;}}printf(n%d

18u,a);}A)31B)13C)10D)205.'()*Ḅ,-./01—a_஺main஺{inta=4,b=5,c=0,d;d=!a&&!b||!c;printf(n%d

19n,d);}A)1B)0C);0ḄᦪD)l6.ᨵ'()*main(){chara>={'a'/b'9c'd','e','fg:h':\0*);inti,j;i=sizeof(a);j=strlen(a);printf("%d,%d\b"i,j);(})*@ABḄ,-./01Cd_oA)9,9B)8,9C)1,8D)9,87.'()*Ḅ@A./01ߟb_o#defineMIN(x,y)(x)<(y)?(x):(y)main(){inti=10,j=15,k;k=10*MIN(i,j);printf("%d

20",k);}A)10B)15C)100D)1508.'()*Ḅ,-./01ߟd_0intfQ

21{staticinti=0;ints=l;s+=i;i++;returns;main஺{inti,a=O;for(i=0;i<5;i++)a+=f();printf(n%d

22n,a);A)20B)24C)5D)159.ᨵ᝞()*intfunc(intajntb){return(a+b);}main(){intx=2,y=5,z=8,r;r=func(func(x,y),z);printf("Ed

231);}F)*Ḅ,-Ḅ./01—d-oA)12B)13C)14D)1510.'()*Ḅ,-./01—b_0main஺{charch[3][5]={nAAAAn,"BBBn,,,CCn};printf(“\"Es\”

24”,ch[l]);)A)“AAAA"B)“BBB”C)MBBBCCnD)“CC”11.'()*᡻ABaḄH01ߟd_omain(){intx,y=252,i=386,*m=&y,*z=&i;x=(z==y);printf("%d",x);}A)252B)1C)0D@AJ-┯LxMNH12.(ᑡ)*Ḅ,-./01ߟb_ostructabc{inta,b,c,s;};main(){structabcs[2]={{1,2,3},{4,5,6}};intt;t=s[0].a+s[1].b;printf(H%d

25n,t);)A)5B)6C)7D)813.(ᑡ)*Ḅ@A./01—b-o

26voidfun(int*a,int*b){int*k;k=a;a=b;b=k;main(){inta=3,b=6,*x=&a,*y=&b;fun(x,y);printf("%d%d”,a,b);)A)63B)36C)WX-┯D)0014.'()*YḄ,-./01_c_஺inta=1234;printf("%2d

27H,a);A)12B)34C)1234D)[\-┯ஹM./15.ᨵ'()*voidfun(inta,intb,intc){a=456,b=567,c=678;}main(){intx=10,y=20,z=30;fon(x,y,z);printf("%d,%d,%d'n”,x,y,z);},-./01—b_oA)30,20,10B)10,20,30C)456,567,678D)678,567,45616.'()*Ḅ,-./01ߟ31_ofun(intx,inty,intz){z=x*x+y*y9}main஺{inta=31;fun(5,2,a);printf("%d”,a);)A)0B)29C)31D)MNH17.'()*Ḅ,-./01—d_omainQcharwQ[10]={“ABCD”L“EFGH”L“IJKL”,“MNOP”),k;for(k=l;k<3;k++)printf("Es”,w[k]);A)ABCDFGHI

28staticints=1;s+=i;i++9returns;)intmain(void)(inti,a=0;for(i=0;i<5;i++)(a+=f()9)printf(n%d

29n,a);return0;)A)10B)15C)20D)2519.'()*Ḅ,-./01_a_olongfun(intn){longs;if(n==1||n==2)s=2;elses=n-fun(n-l);returns;)mainQ{printf("%ld

30”,fun(3));)Aஹ1Bஹ2Cஹ3Dஹ420.'()*Ḅ,-./01—d_ointmain(void){intx=8;fbr(;x>0;x"){if(x%3){printf("%d,",x—);continue;}printf("Ed,”x);))A.7,4,2B.8,7,5,2C.9,7,6,4D.8,5,4,221.'()*Ḅ,-./01ߟc_„intmain(void){inta,b;fbr(a=l,b=l;a<=l0;a++){if(b>=10)break;if(b%3==l){b+=3;continuc;}b-=5;

31printf(0%d

32",a);return0;)A.6B.5C.4D.3qஹr⌱⚪1.ᙠcvwxLyz{|}~ᙠᵨAᡈNL᪵'(ABCD).(A){|H(B)NF{|ḄH(C)NF{|ᡠAḄ@(D)ᙠWXJᐸᑖᓫᐗ(E)N{|Ḅzᦪ2.'(0¡¢£Ḅ)*Y0o(A)for(i=l;;)(if(++i%2==0)continue;if(++i%3==0)break;)(B)i=32767;do{if(i<0)break;}while(++i);(C)for(i=l;;)if(4-+i<10)continue;(D)i=l;while(i—);(E)unsignedk=0;do{++k;}while(k>=0);3.¤ᨵ'(¥Nv¦Lᑣ(☢⊤ª«xH3Ḅ0—d,eostructs{intil;structs*i2;)staticstructsa[3]={l,&a[l],2,&a[2],3,&a[0]},*ptr;ptr=&a[l];(A)ptr->il++(B)ptr++->il(C)*ptr->il(D)4-+ptr->il(E)(++ptr)->il4.(☢)*Ḅ¬0Cz᦮ᦪ¯°±²ᣚCz᦮ᦪL᝞“-324”²ᣚ-324,´⌱µ¶·஺#include#includemain()chars[6];

33intn;gets(s);if(*s==)n=_2_;elsen=chnum(s);printf("Ed

34”,n);chnum(char*p)intnum=O,k,len,j;len=strlen(p);for(;_3_;p++)(k-4:j=(-len);while(_5_){k=k*10;}num=num+k;return(num);)2(A)chnumঠ(B)-chnum(*s)(C)-chnum(s+1)(D)chnum(s++)(E)-chnum(++s)3(A)*p!='\0'(B)*(++p)!='\(T(Q*(p++)!='\0'(D)len!=O(E)*p=='\0'4(A)*p(B)*p+'O'(C)*p-'O'(D)*p-32(E)p¹-'O'5(A)-j>0(B)j->0(C)-len>0(D)len->0(E)j—5.(☢)*ᑤ◀¯°±sxḄᡠᨵ·¼(ᒹ¾TAB°ஹ¿À°ஹᣚA°)஺ᙠÁÂḄCÃ⌱⚗x⌱µÅÆḄᑁȶᐭᜐ஺#include#includemain஺{chars[81]=^abcdefg.w;delspace(s);puts(s);)delspace(char*str){inti,t;charts[81];for(i=0,t=O;—8—;—9_)if(!isspace(str[i]))ts[t++]=stt[i];_1O_;strcpy(str,ts);8(A)str[i](B)!str[i](C)str[i]!=L\0'(D)str[i]=NULL(E)str[i]==0

359(A)t++(B)++i(C)i++(D)*(ts+i)(E)++t10(A)tsËq'\0'(B)str[t++]=L\0'(C)ts[t++]=L\0'(D)ts[--t]='\0'(E)stÌÍ'\0’5.(ᑡÎÏᑏÑ0ÁḄLÒÓ0Ô|஺(ABCEGHÅÆLD┯Õ)A125B-.456C1.25e20D'AB'EE6F0238GOxabcdcfHu

36\\\,\123nÖஹ¶·⚪1.×32ØÙÚ(,C++)*L´ÛsizeofḄHcharstrQ="Hello”char*p=str;intn=10;´Ûsizeof(str)=6sizeof(p)=4sizeof(n)=4voidFoo(charstr[100]){´Ûsizeof(str)=4)void*p=malloc(100);´Ûsizeof(p)=42¤intarrO={6,7,8,9,10};int*ptr=arr;*(ptr4-+)+=123;printf(n%d,%dM*ptr*(++ptr));./8,83.Nint**a[3][4],ᑣ{|ᓰᨵḄᑁ·Ý1-48—Þ1ßᜐNḄ0ᢣᔣᢣ┐Ḅᢣ┐ᦪÃLÁã32ØÙÚLᢣ┐ᓰᑁ·Ý4¯⁚Låßæ·Ý3X4X4=48஺4.᝞/içã5,èé(++i)--Ḅê¿H0_6_஺5.ᜮᦻíxḄifndef/define/endifîïéᵨð⚜ᜐᳮᢣóஹ■õᜮᦻíö÷øùᵨ6.#includc¥#includeḄúûὅᵨᩭᒹþÿ᛻ḄᜮᦻὅᵨᩭᒹᑏḄᜮᦻ஺7.switchOᐕḄᦪ8."ᑡ$᪘Ḅ&'("ᑡᐜ*ᐜ+᪘*ᐜ+9.ᑏ,-“᪗0”23-24ᐭ6-7ᦪ89:;<Ḅ,-#defineMin(X,Y)஻>?@ᨵB

3710.ᑏ+ᑨDABCDE-⊤GHḄᔲJKLJKᑏ+MN⊤GHaḄOinta=4;(A)a+=(a++);9(B)a+=(++a);10—(C)(a++)+=a;┯QRS,-ᨵᦔUVWXOYᦋ((++a)+=a;[ᦋ\ᫀ10(D)(++a)+=(a++);1111.^32_`ab,C++defghsizeofḄO.charstrQ=char*p=str;intn=10;fghsizeof(str)=___17sizeof(p)=4sizeof(n)=4voidFoo(charstr[100]){fghsizeof(str)=4}void*p=malloc(100);fghsizeof(p)=412ஹstrcatWkstrSrcḄᑁmnoᑮstrDest,(qrs⌕char*Ḅ9:OuvwXOxᐸzUV13.inti=10,j=10,k=3;k*=i+j;kᨬḄOu\|60,}⚪ὃᐜ▭ᑏᡂ|k*=(i+j)B,XOhᐜᨬ14.ghJḄᦪ_asin°BghᦪOḄᦪ_fabs°;ghᦪnvḄᦪ_pow°Bᦪᓄ(ḄᦪfcvtO—஺15.⚪“A°᪗ᑖ'(/*$_*/஺19.,-³᦮deµ¶ᨵ,-·(mainḄᦪ஺20,-ᦪḄᦪ¸¹,ᩩ»ᔠ¡஺21.deḄ⚜ᜐᳮÀᢣÂ#,«ᜮḄÀ஺22.,ᩩ⊤GH¡µ¶Â,ᑖÄÅ(>°஺23ᙠ#includeÀᡠᒹḄᜮᦻYÂ`a£ÈḄᜮᦻÉYÂᵨᡝ(ᡈdὅ£ÈḄᜮᦻ஺24¨ᵨ#includeÀYÂᒹ,-ᜮᦻÉYÂᒹ,-,deᦻ஺25,-ᦪ£Èᵫᦪᜮ$ᦪ¸6ÍᑖÎᡂ஺26L,-ᦪḄ£ÈᜐÏᵨÐḄᦪÑÒᑣᙠde«¬YÂḕÕÖᦪḄ,×(ᡈØÙ)¡஺27deᦻḄÛ┯Qᑖ(ÜÝ(warning)$Þ(error)6஺28ߨᵨ_voidàᶇÅ(ᦪâÖᦪ9:ãäO஺29ᦪ7ᦪ⊤ᵨ_void_àᶇ⊤åâᑣ⊤åÖ7ᦪ⊤(æ஺30,ᩩᦪס"intfunl(void);"YçÖᦪḄ9:(_int,Öᦪèᨵ

38,0,-7ᦪ஺31Ꮇ£x=5,y=6,ᑣ⊤GHx++*++yḄO(___35஺32Ꮇ£x=5,y=6,ᑣ⊤GHx-*-yḄO(ߟ25஺33Ꮇ£x=5,y=6,ᑣ᡻§⊤GHy*=x++ghx$yḄOᑖ'(6—$3034Ꮇ£x=5,y=6,ᑣ᡻§⊤GHy+=x-ghx$yḄOᑖ'(4_$__11____஺35íᦪ0x145îḄᓝ*ᑴO(ߟ325ߟ஺36íᦪ0345îḄᓝ*ᑴO(229_037ᓝ*ᑴíᦪ245îḄᓝñ*ᑴḄC++⊤å(0xF5,஺38ᓝ*ᑴíᦪ245îḄò*ᑴḄC++⊤å(0365—஺39SignedcharḄOóõ_-128_ö_+127_Ñ÷Ḅ᦮ᦪ஺40.int$floatḄᦪᑖ'ᓰᵨ4_$4_-⁚஺41.float$doubleḄᦪᑖ'ᓰᵨ4_$8___-⁚஺42.bool$charḄᦪᑖ'ᓰᵨ1$1,-⁚஺43.unsignedshortint$intḄúûᑖ'(2_$4___஺44.“Thisஹ'sabook.'n"Ḅúû(15஺45."

39This\'sapen

40

41"Ḅúû(15»46.þÿ"abcdcF'◤⌕_7⁚஺47."a+b=c”◤⌕6⁚஺48.Ꮇxy᦮ᐸᑖ165,ᑣx%yx/yḄᑖ13o49.Ꮇxy᦮ᐸᑖ165,ᑣx/ydoublc(x)/yḄᑖ3ߟ3.2o50.Ꮇx!ᑣx&&trucḄ_xo51.Ꮇx■!ᑣx||trueḄtrue(ᡈ1)஺52.Ꮇx!ᑣx&&falscḄfalse(ᡈ0)_஺53.Ꮇx!ᑣx||falseḄx஺54.Ꮇx!ᑣ!x||falseḄ!x஺55.Ꮇx•!ᑣx&&!xḄfalse(ᡈ0)஺56.Ꮇx!ᑣx||!xḄtrue(ᡈ1)_஺57.'ᦪ-4.2056.7E-9ᑖᐹᨵ42—+ᨵᦔᦪ஺58.-./0Ḅ1-.2-.'!,4Ḅ᦮ᦪ஺59.'ᦪ1003.62Ḅᦪ5/ᑖint_double—஺60.6x=5,y=10,ᑣ78y*=++x⊤:;<xyḄᑖ_6____60___஺61.Ꮇxchᑖintcharᑣsizeof(x)sizeof(ch)Ḅᑖ_4__1ߟ஺62.Ꮇx=10,ᑣ⊤:;xீ=10?20:30Ḅ_20_஺63.⊤:;sqrt(81)pow(6,3)Ḅᑖ—9——216ߟ஺64.@ABCᦪḄ⊤:;randQ%20Ḅᙠ_0__19EFᑁ஺65.ᙠswitchHI01HI᪗Kᡠ@ᐵNcase<☢Ḅ⊤:;PQ_'!___஺66.ᙠifHI01elseᐵNR4S☢TUVWXᨬZ[ḄifᐵN\]ᝅ஺67._HI᪗K`ᵨḄCbᶇcasedefauledeᵨf_switch____HIḄgh0஺68.᡻jswitchHIkᙠlj_ᩩnḄ⊤:;o<pqrᓛ]Ḅ᪗K+tuᔣw᡻jxyᑮw᪗K+tk({|/~{|)—~{|—᡻j஺69.6whileḄ"ᜮ""whilc(i++v=10)”,WXiḄ0,Tkᙠh0~ᦋiḄᑣhp᡻j11V<'஺

4270.6d஺Ḅ""ttwhilc(++i<10)\WXiḄ0,Tkᙠh0~ᦋiḄᑣhp᡻j—10—V<'஺71.xᙠ0᡻jᑮbreakHIkpU/HIᡈswitchHIḄ᡻j஺72.xᙠ0᡻jᑮ—continue—HIkpᡠᙠHI0hḄV᡻j஺73.ᙠ0᡻jᑮ.return—HIkpᡠᙠCᦪḄ᡻jᑮᵨCᦪḄ+t஺74.ᙠ᡻j—(ᡈmain)_Cᦪᵨ<p᦮Ḅ᡻jᑮC++ᡂ஺75.ᐗ/intḄᦪa[10]ᐳᓰᵨ—40⁚Ḅ£F஺76.ᐗ/doubleḄ¤¥ᦪa¦[6]ᐳᓰᵨ192—⁚Ḅ£F஺77.ᐗ/charḄ¤¥ᦪa[10][30]ᐳᓰᵨ—300_⁚Ḅ£F஺78.'a'"a”ᑖ◤⌕ᓰᵨ1—2⁚஺¨w⚪ª«¬⚪1ஹunsignedshortarray[J—{1,2,3,4,5,6,7};inti=3;*(array+i)¤¯°:42.±ᑏ¬wᑡ´ṹḄ«¬ᑁ¶#includcmain(){inta,b,c,d;a=10;b=a++;c=++a;d=10*a++;printf(Hb,c,d:%d,%d,%dH,b,c,d);return0;}°ஹ10,12,1203ஹ#include"stdafx.h"#dcfincSQR(X)X*Xintmain(intargc,char*argv[]){inta=10;intk=2;intm=1;a/=SQR(k+m)/SQR(k+m);

43printf(H%d

44n,a);return0;}¸⍝⚪ªḄº»¼¯definedg½¾ᙠ¿ÀkdÁᓫ´ᣚX*X½¾W~Ä8ÅÆᑣḄa/=(k+m)*(k+m)/(k+m)*(k+m);=>aI-(k+m)*l*(k+m);=>a=a/9;=>a=1;4.ow☢CᦪḄintfunc(x){intcountx=0;while(x)(countx++;X=x&(x-1);}returncountx;)Ꮇx=9999o°ᫀÈ8ÉÊÈpxËᓄ2lᑴÎ@ᨵḄ1Ḅᦪ஺5.±Ï¨wḄ«¬#includeunion{inti;charx[2];}a;voidmain஺(a.x[0]=10;a.x[l]=1;printf(H%dH,a.i);)°ᫀÈ266(Ð+ÐᙢᙬÓ+ÓᙢᙬᑁᓰᵨÔÕOxOlOA)6.±Ï¨wḄ«¬main஺

45union{/*gὶᔠ*/inti;struct{/*ᙠὶᔠ0g᪀*/charfirst;charsecond;}half;{number;number.i=0x4241;/*ὶᔠᡂᕒÛ*/printf(1,%c%c

46",numbcr.half.first,mumbcr.half.sccond);number.half.first='a,;/*ὶᔠ0᪀ᡂᕒÛ*/numbcr.half.sccond=,b,;printf(n%x

47M,number.i);gctch();}°ᫀÈAB(0x41ÜÝA,Ð+Þ0x42ÜÝE,Ó+)6261(number.inumber.halfᐳᵨᙽᙢᙬ£F)7.Inthemain஺function,afterModifyString(text)iscalled,what'sthevalueof'text'#includc#includeintFindSubString(char*pch){intcount=0;char*p1=pch;whilc(*pl!='\0)(if(*pl==plà1)(pl++Þcount++;)else{break;)}intcount2=count;while(*p1!='\0)(if(*pl==pl[l]+l){p1++;count2—;

48elsebreak;)}if(count2==0)returncount;return0;)voidModifyString(char*pText){char*pl=pTcxt;char*p2=pl;while(*pl!='\0)(intcount=FindSubString(pl);if(count>0){*p2++=*p1;sprintf(p2,H%r',count);while(*p2!=|p2++;)pl+=count+count+l;}else{*p2++=*p1++;}})voidmain(void)(chartext[32]="XYBCDCBABABA";ModifyString(text);printf(text);)°ÈXYBCDCBAIBAAFindSubStringâã¬äåæçè⌴êḄᦪXæçᦪëìíf⌴êᦪ஺᝞ABA1,ABAB1,ABCBA2,BCBA0஺sprintf(p2,"%I",count);p*p2=T,*(p2+l)='\0'o

498.±ÏïjḄvoidfun(char*a,char*b){a=b;(*a)++;)voidmainQ{charsi='A\s2=,a,;char*pl=&sl;char*p2=&s2;fun(pl,p2);printf("%c%c,,,sl,s2);)«¬È°È«¬ÈAb,ðᙠfunCᦪñᢣ┐aᢣᔣs2E(a=b),ZḼõs2EḄç1öE((*a)++),ᡠ¨s2ífE,si~÷஺9.ᑏ¬ïjintsum(inta){autointc=0;staticintb=3;c+=l;b+=2;return(a4-b+c);)voidmainQ{intI;inta=2;for(I=0;I<5;l4-+){printf(H%d,n,sum(a));})°È8,10,12,14,16øùbúûstatic☟᝱ᐰÿᐸᙠᵨᢝᩭḄḄ஺\10.ᑏintfunc(inta)intb;

50switch(a)case1:b=30;case2:b=20;ease3:b=16;default:b=0;returnb;)ᑣfun«l)=??"#func(l)=O,$%&ᨵbreak()switch*+-•./0ᑮb=0஺23⏨ᡃ67⌕9:breako11.<=">⚪voidGetdVfemor)r(char**p,intnum){*p=(char*)malloc(num);voidTest(void){char*str=NULL;GetMemor)r(&str,100);strcpy(str,"hello11);printf(str);A>TestBᦪ+ᨵDE᪵Ḅ?"#H“hello”12.<=">⚪voidTest(void){char*str=(char*)malloc(lOO);strcpy(str,"hello");frce(str);if(str!=NULL){strcpy(str,"world");printf(str);}A>TestBᦪ+ᨵDE᪵ḄI"#H"world"$%free(str)JKLᦋstrᡠᢣḄᑁQᑁR஺13.<=">⚪char*GctMcmory(void){charp|]="helloworld'1;returnp;

51voidTcst(void){char*str=NULL;str=GctMcmoryOkprintf(str);)A>TestBᦪ+ᨵDE᪵Ḅ?"#pᦔḄᢣ┐H7st14ஹ="☢Ḅ>⚪(l).VoidGetMemory(char**p,intnum){*p=(char*)malloc(num);)voidTcst(void){char*str=NULL;GetMemory(&str,100);strcpy(str,nhelloM);printf(str);}A>TestBᦪ+ᨵDE᪵Ḅ?"#H"hello”15ஹvoidTest(void){char*str=(char*)malloc(lOO);strcpy(str,"hello");free(str);if(str!=NULL){strcpy(str,"world");printf(str);A>TestBᦪ+ᨵDE᪵Ḅ?"#H"world"16ஹchar*GetMemonz(void){charp[]="helloworld";returnp;voidTest(void){char*str=NULL;str=GetMemotyOkprintf(str);)A>TestBᦪ+ᨵDE᪵Ḅ?"#pᦔḄᢣ┐H7st

5217.ᩩH()ᑖHDEIcharstrl="abcn;charstr2Q=Mabcn;constcharstr3[]="abc”kconstcharstr4[]=nabcn;constchar*str5="abc";constchar*str6=Mabc";cout<

53a2ᡠᓰ¥ḄᑁQᓫᐗḄ஺(int&)aḄᦻ“ᙽᙢᙬ᦮ᦪ⌕ᩭ"#$஺”᪵ᑁ(OxOOOO8O3Fᢥ᦮ᦪ*+ᐸ-./"1065353216(ᓝ2ᑴᦪ)஺56789:ṹ<=>?"(int)a@A᪀⌼DEFGaḄ᦮Hᦪ”IJK(int&)ḄLᵨᑣOO"⊤QDEFRHSTUVᙠX8.YZ==⌱]-^Ḅ@_᱐2O.#includc"stdafx.h**YnP}2{&kOvH',o0#dcfincSQR(X)X*Xintmain(intargc,char*argv[]){inta=10;intk=2;intm=1;a/=SQR(k+m)/SQR(k+m);printf(n%d

54H,a);return0;}⍝⚪eḄfg"#$hidefinej"kVKlᙠ9]j"mᓫ:ᣚX*XKlpq6rstᑣḄa/=k+m*k+m/k+m*k+m;=>a/=(k+m)*1*(k+m);=>a=a/9;=>a=1;21..ᑏwxfg{charstr|]="world";cout<

55main஺{inti=l;whilc(i<=12){if(!(i%4))printfC%d,n,i);i++y}}24.={|Ḅ}fg"abcdemain஺{chars|]="abcdef;s[5]=\0';printfC'%s

56",s);}25.={|Ḅ}fg"s=8.main஺{inta[3][3]={{3,2,l},{4,5,6},{2,9,2))yinti,j,s=O;for(i=0;i<3;i+4-)for(j=0;jv3;j++)if(i==2-j)s=s+a[i]O]yprintf(ns=%dH,s);}26.={|Ḅ}fgmain஺{inta=10;if(a++>10)printf(H%d

57n,a);elseprintf(,,a=%d

58*\a);}wxfgEa=H_<>27.={|Ḅ}fgmain஺{chars|]±"abcdeF';s[4]='\0,;printf(H%s

59n,s);}wxfgEabed_o28.={|Ḅ}fgmain஺{inti=l;whUe(i<=12){if(!(i%3))printf(n%d,H,i);

60i++ywxfgE3,6,9,12_o29.={|Ḅ}fgmain(){intx=25,y=15;if(x>y)s,&y);printf(n%dn,x);)s*pl,int*p2){int*temp;temp=pl;pl=p2;p2=temp;)wxfg25_o30.={|Ḅ}fg-30_omain(){inta=21,b=11;printf~d

61H,a+b,b+a);}31.J☢F{|Ḅwxfgnotequal!E஺charbufl[10]=HheUoH;charbuf2[10]="hel]o";if(bufl==buf2)printf(nequal!H);elseprintf(unotequal!”)y32.☢F{|Ḅ}"#$?_y=-l_o#includemainQ{inty=10;while(y);printfCy=%d

62M,y);)33.¾¿{|᡻xÁÂÃÄÅ#$ia=4,b=9.50voidmainQ{inta;floatb;a=4;b=9.5;printfCa=%d,b=%4.2f

63n,a,b);

6434.Æk,gᙳXintHÈÉᑣ=ÊËḄ}XÌE⚗i15,6fintkgk=017;g=lllyprintf(n%d,H,k);printf(u%x

65H,g);35.={|Ḅ}fg"—11,13_omain஺{inta=12,b=l2;printff,%d,%d

66n,—a,++b);}36.ᑡ{|Ḅwxfg"ߟa=10,b=5__o#includemainQ{inta=2,c=5;printf(*,a=%d,b=%d

67,,,a*c+4-,c);)37.Æᨵ={|Ðintcl=l,c2=2,c3;c3=1.0/c2*cl;ᑣ᡻xÁc3ÑḄ"E0__o38.ᨵ᝞{|main(){inti,sum;fbr(i=1;i<=3;sum++)sum+=i;printf("~d

68”,sum);}¾{|Ḅ᡻xfg"_ÓÔÕ_____஺39.ᨵ={|mainQ{inta=7,b=8,*p,*q,*r;p=&a;q=&b;ÖPyP±qyq=ryprintf(”~d,%d,%d,%d

69”,*p,*q,a,b);){|wxÁḄ}fg"—8,7,7,8ߟ஺40.={|ÑwhileÔÕḄÔÕØᦪ"EÓÔÕ஺main஺{inti=0;while(i<10){if(i

70if(i==5)break;i++y})41.ᨵ={|main(){inta=666,b=888;printf(H%d

71",a,b);){|wxÁḄ}fg"666_o42.={|Ḅ}fg"ߟ9,10_o#includemainQ{inti=OlO,j=1O;printf(',%d,%d

72",4-+i,j-}43.Æ᡻x={|ÚÛÜ}ᐭ9,ᑣ}fg"10_0mainQ{intn;scanf("~d“&n);if(n++<10)printf("~d

73”,n);elseprintf("~d

74”,n);)44.={|Ḅ}fg"ߟ31_ofun(intx,inty,intz){z=x*x4-y*yy)mainQ{inta=31;fun(5,2,a);printf("%d”,a);)45.#includestructNODE{intnum;structNODE*ncxt;};main(){structNODE*p,*q,*r;intsum=0;p=(structNODE*)malloc(sizeof(structNODE));

75q=(structNODE*)malloc(sizcof(structNODE));r=(structNODE*)malloc(sizeof(structNODE));p->num=l;q->num=2;r->num=3;p->next=q;q->next=r;r->next=NULL;sum+=q->next->num;sum+=p->num;printf("~d

76”,sum);)᡻xÁḄ}fg"—4_046.▅ãEC{|ä{|Ḅᐰæ}⌲xᑏᙠèᔁ஺[{|]inttcst4(intn){intd=0,m=n;while(m){d=d*10+m%10;m/=10;)returnd==n;)intdataQ={5,123,121,453,545};main஺{inti;for(1=0;I

77”,data[I],test4(data[I])?“OK”“NO”);)è:5:OK123:NO121:OK453:NO545:OK47.main(){intx=0,y=5,z=3;while(z—>0&&++x<5)y=y-l;printf("%d,%d,%d

78”,x,y,z);}{|᡻xÁḄ}fg"—3,2,-1_o48.ᑏ={|Ḅ}fg஺mainO{char*alpha[6]={nABCD^',IJKL^nMNOP'\,'QRSr,y'UWXn};char**p;inti;p±alpha;for(i=0q<4;i++)printf(H%su,p[i]);printff

79H);

80èᫀXABCDIJKI.MNOPQRST49.#includemain஺{intc;while((c=getchar())!=<

81){switch(c-'2'){case0:case1:putchar(c+4);case2:putchar(c+4);break;case3:putchar(c+3);default:putchar(c+2);break;ÚëEᑡìí}ᐭ=ᦪî/:⊤EFðñò஺2473/{|Ḅ}fg"_668977__o50.ó⚪ÑcharḄᜧõX1Fö⁚intmain(void)(chara[30];char*b=(char*)malloc(20*sizcof(char));printf("%dø,sizeof(a));printf("%d,",sizcof(b));printf~dù,sizeof(a[3]));printf(H%d,n,sizcof(b+3));printf(,,%dH,sizeof(*(b+4)));return0;}{|Ḅ}fg"—30,4,1,4,151.intmain(void){inta,b,c=241;a=c/100%9;b=printf("~d,%d"a,b);

82return0;{|Ḅ}fg"_2,1_____o52.intmain(void){intx,a=1,b=3,c=5,d=4;if(avoidmain஺{inta,b;for(a=l,b=l;a<=l00;a++){if(b>=20)break;if(b%3==l)b+=3;continue;}b-=5;printf(M%d,%d

83H,a,b);}{|Ḅ}fg"_8,17_54.intmain(void){intx=0,y=10;if(x=0)y--;elseif(x>0)y++;elsey+=y;printf("~d”y);return0;}{|Ḅ}fg"E20_o55.ᑏ}voidfun(inti){staticintvalue=i++;cout<

84intmain஺(fun(O);fanপ;fun(2);}è0,0,056.ᑏ{|wxfginta[3];a[0]=0;a[l]=l;a[2]=2;int*p,*q;p=ayq=&a[2];ᑣa[q-p]=?#[q-p]=a[2]=2;a57.ûᑏᑡ:ṹḄ}ᑁ(#includcintmain(void)(inta,b,c,d;a=10;b=a++;c=+4-a;d=10*a++;printf("b,c,d:%d,%d,%d",b,c,d);return0;)è10,12,12058.ᑏᑡ:ṹḄ}ᑁ(#includeintinc(inta){return(++a);}intmulti(int*a,int*b,int*c){rcturn(*c=*a**b);)typedefint(FUNCl)(intin);typedefint(FUNC2)(int*,int*3nt*);voidshow(FUNC2fun,intargl,int*arg2){INCp=&inc;inttemp=p(argl);

85fun(&temp,&argl,arg2);printf(n%d

86n,*arg2);mainQ{inta;show(multi,10,&a);return0;}èno59.ᑏ{|fgvoidFunc(charstr[100]){printf(M%d

87n,sizeof(str));)è4ᑖ᪆ᢣ┐60.☢Ḅᡭᓺ—1251121f(int);mainQinti;for(i=0;i<5;i++)cout«F(I)«""-returnO;f(inti)staticintk=l;for(;i>0;i--)k+=i;returnk;5ஹᑨ8⚪1.ᨵᦪ<=>inta[2][2]={{l},{2,3}};ᑣaFপḄHI0஺(T)2.int(*ptr)0,ᑣptrNOᦪ<ḄPQ஺(F)3.ᢣ┐ᙠSTUVWXYZ>,<,>=,<=,==[\஺(F)4.switch(c)`abcXcintJong,char,float,unsignedintgh஺(F)

885.#dcfincprint(x)printf(uthcno,n#xn,is")(T)kஹlm⚪1.no“qᵨ”tᵭvwxᵨ“qᵨ”⌕z{|}~⚪tmqᵨ᪗Ḅ“P"(alias),ᵨḄᦔᐰ஺ᵭvNqᵨḄ᎛ᑗ⌕ᐸYZᓄ஺qᵨv᪗Pᨵ¡P¢ᓽ¤᪗¥P¢wqᵨP¦§¨©¤qᵨPIᐸªPḄP஺vNqᵨ¦«=>¬N®⊤°¤qᵨP᪗PḄNP±²¦N³ᦪ´ghµ¶qᵨ±²¦ᓰ¸¹ᓫᐗ¼½¾¦¿qᵨᑖÁ¸¹ᓫᐗ஺¦§ÂÃᦪ<Ḅqᵨ஺2.Ä“qᵨ”IÅᦪÆᦪᨵ|}ᱯÈt(1)É⌴qᵨ¿ÅᦪÉ⌴ᢣ┐ḄᦔN᪵Ḅ஺ÌÍÎÅᦪḄÏÆᡂI¥ᩭÒÎÅᦪbḄÓÆᡈÕḄNPᩭxᵨᡠcᙠÍÎÅᦪbÏÆḄᐸḄ᪗Õ(ᙠÒÎÅᦪb)Ḅ஺(2)xᵨqᵨÉ⌴ÅᦪḄÆᦪᙠᑁ¸bØÙᨵÚÛÓÆḄܱÓÆ-ÝxᵨNÞÉ⌴ÅᦪḄÆᦪßÛÅᦪÎᵨ◤⌕¿ÏÆᑖÁ¸¹ᓫᐗÏÆÓÆḄܱ-᝞É⌴ḄÕâÄÎᵨãä᪀⌼Åᦪ஺µ¶ÆᦪÉ⌴Ḅᦪ´çᜧᵨqᵨéᵨNÞÉ⌴ÆᦪḄᦔ᳛wᡠᓰëìWí஺(3)xᵨᢣ┐IÅᦪḄÆᦪîᯠ¾§ðᑮxᵨqᵨḄᦔòᙠÍÎÅᦪb᪵⌕¿ÏÆᑖÁ¸¹ᓫᐗó◤⌕ôõxᵨ"*ᢣ┐P"ḄÏöYZ[\Ì÷ø᧕ÚÛ┯ûóḄ▅ýឋçÿ☢ᙠᦪḄᵨᜐᵨḄᙢᙬ஺ᵨ᧕ᵨᨎ஺3.ᙠ$%&᎛◤⌕ᵨ“+ᵨ”-᝞/0⌕ᑭᵨᵨ2345Ḅᦔ᳛8⌕9:;⌴=ᦪḄᦪ>?ᙠᦪ@AᦋCDᵨ+ᵨ஺+ᵨEFGHconstNO᪗QR&ᵨT=V᪗TW1inta;constint&ra=a;

89ra=l;//┯^a=l;஻`aW2stringfbo();voidbar(string&s);b%c☢Ḅ⊤eGfghiḄHbar(foo());bar(nhelloworld1*);jkᙠlfoo()m“hclloworld”nopqrst&uvᙠC++@wxt&uvogconstNOḄ஺kyz☢Ḅ⊤eGCg{|fsconstNOḄuv}ᣚhconstNOwghiḄ஺ᵨOᦪDᙠAconstḄcconst4.“ᵨ”ᢣ┐Ḅg$%-ᢣ┐sᢣ┐ᢣᔣsuvuᡠᢣᔣḄ஺45@ᵨᢣ┐45ḄឋᵨCgV᪗ḄTuᵨḄCguV᪗Ḅ஺y᜜,Cgz☢2ᑮḄuᦪ;refmpointerḄ஺5.᪀ὶᔠᨵm-1.᪀mὶᔠogᵫ¤s?¥Ḅᦪ>NOᡂᕒ¨ᡂ©ᙠª«¥&¬ὶᔠ@®¯°sA⌱@Ḅᡂᕒ(ᡠᨵᡂᕒᐳᵨᙽᙢᙬµ)᪀Ḅᡠᨵᡂᕒo®ᙠ(?¥ᡂᕒḄ®¯ᙢᙬ?¥)஺2.ulὶᔠḄ?¥ᡂᕒ·¸fpuᐸᡂᕒºᑏjᩭᡂᕒḄ¸C?®ᙠ°ul᪀Ḅ?¥ᡂᕒ·¸g½?¾¿Ḅ஺6.ᑖᑏÁ8஺031ᵫ£102&ᢣ┐NOḄa“ÔḄÄÅÆÇ஺ÈᫀHBOOL:if(!a)orif(a)int:if(a==0)float:constEXPRESSIONEXP=0.000001

90if(a-EXP)pointer:if(a!=NULL)orif(a==NULL)7.ÊËÁconst#defineÌÄᨵ«Í-ÈH1)const+ᨵᦪ>NOÎ+Ïᨵᦪ>NO஺ÐÑᘤÓuÔὅÖ×NOØᐰÚÛ஺uὅÖ×ÜRÝᣚÏᨵNOØᐰÚÛÞßᙠÜRÝᣚpqràᧇ?ᑮḄ┯^஺2)ᨵxâᡂᓄḄ{äᐹÓuconst+Ö×{©g?uÎ+Ö×{8.æçᦪ¨ᢣ┐Ḅ-ᦪ¨⌕%ᙠ☟᝱®êAëì(᝞ᐰíᦪ¨)⌕%ᙠ᪘zAëì஺ᢣ┐Óï&ᢣᔣªàNOḄᑁ®ᙽ஺পòᦋᑁzḄchara[]="hello”;a[0]='X';char*p="world";//óàpᢣᔣ+ÜRnp[0]='X';஻ÐÑᘤ?ôõ┯^ö×&┯^(2)ᵨö÷RsizcofÓø÷Áᦪ¨Ḅ(Ü⁚ᦪ)஺sicof(p),pᢣ┐úᑮḄgsᢣ┐2ḄÜ⁚ᦪ?gpᡠᢣḄᑁ®஺C++/CÆûÏᨵüiý⍝ᢣ┐ᡠᢣḄᑁ®◀ᙠᵭᑁ஺ᦪᦪḄᦪ⌴ᦪ⌨ᓄ!Ḅᢣ┐஺chara|]="helloworld";char*p=a;cout<ᐰ1஺⌕ᵨᐰ13*◤⌕Bᵨ"::";123*FGHᐰ13*8ᙠᦪᑁIᵨJK3*<ᵨᑮ8Ḅ123*,-<ᵨᑮᐰ13*஺MNᨵPQRᘤ,TᙠUKᦪᑁFGVWXK8Ḅ123*Y᝞ᙠ[K\]^ᑁ_VWUK8Ḅ123*,`K123*Ḅᵨabᙠ`K\]^ᑁ஺

9110.᝞cIᵨUKdeVWfḄᐰ13*9:;externFGᵨIᵨᜮᦻiḄjklFGᵨexternᐵn$᝞oᵨIᵨᜮᦻijkᩭIᵨqKᙠᜮᦻirstḄᐰ13ᳮᎷVwx`KQᑏ┯{`|ᙠQR}~<┯᝞owᵨexternjkIᵨᎷVw{᪵Ḅ┯`|ᙠQR}~-<┯,ᙠ}~┯஺11.ᐰ13*F-FGVWᙠFXK.CᦻiᒹḄᜮᦻir9|9:;FGᙠ-ḄCᦻirGstatickᩭst8ᐰ13*஺FGᙠ-ḄCᦻirst8Ḅᐰ13*.ᐸr4ᨵUKCᦻirM3*-<┯.12.staticᐰ13*HḄᐰ13*ᨵ|9static123*(123*ᨵ|9staticᦪHᦪᨵ|9:;1ᐰ13*᜜23*ḄtGstaticb᪀ᡂ{☟᝱Ḅᐰ13*஺ᐰ13*¢£b.☟᝱¤jk☟᝱ᐰ13*ᯠl.☟᝱¤jk஺J[ὅᙠ¤jk§¨©-஺J[ὅḄᙠN☟᝱ᐰ13*Ḅᵨa.᦮K«¬UK«¬ᵫXK«ᦻiᡂ☟᝱Ḅᐰ13*ᙠᔜK«ᦻir_.ᨵᦔḄ஺,☟᝱ᐰ13*ᑣ▲ᑴ{ᐸᵨaᓽᙠVW3*Ḅ«ᦻiᑁᨵᦔᙠU«¬Ḅᐸ«ᦻir-4Bᵨ஺ᵫN☟᝱ᐰ13*Ḅᵨa1▲NUK«ᦻiᑁ4«ᦻiᑁḄᦪµᵨ¶FG·¸ᙠᐸ«ᦻirI¹┯஺2ºG§ᑖ᪆FG½¾123*ᦋ3☟᝱3*À.ᦋ3{Ḅ¤jkᓽᦋ3{ḄÁ}஺¾ᐰ13*ᦋ3☟᝱3*À.ᦋ3{Ḅᵨa▲ᑴ{ḄBᵨÃ஺3staticᦪHᦪᵨa-Äᙠ¢ᦻi஺ᙠ«ᦻirBᵨḄᦪÅtᑁ2ᦪstatic,ᑁ2ᦪÅᙠ«ᦻirt(VW஺MNFᙠ«ᦻiG᜜BᵨḄᦪÅᙠUKᜮᦻirt⌕BᵨJPᦪḄ«ᦻi⌕ᒹJKᜮᦻiƧᡠÈ;staticᐰ13*HḄᐰ13*ᨵ|;staticᐰ13*BᓄUÉ■ËᙠᐸÌᦻiᓫᐗrIᵨÏstatic123*(123*ᨵ|;static123*ÐᓄUÉÑUÉÒÓ§UÉÔoÏ

92staticᦪHᦪᨵ|;staticᦪᙠᑁrᨵUÕᦪᙠÖK×ᵨrØᢝUÕÚÛ13.|.⚜QRc◤⌕⚜QR;:;b.ᢣ¬᡻ḄUP⚜ᜐᳮßà⌕ᢣ#⊤ãḄ.c◤⌕⚜QR91ஹå.Bᵨ-eæᦋḄᜧ!èṹ^஺2ஹ¬ᵫXKêᙽᡂᡠᨵêᙽ_BᵨU᪗íḄᒹᦻi(îḄQR⌱⚗஺ᙠJñòóÑFGxᡠᨵᒹᦻi⚜QRUK⚜QRᜮ஺14.ᙠC++¬r×ᵨCQRᘤQRÀḄᦪ|⌕ôextern"C”st9:;ᦪ(3*C++QRÀᙠõö÷rḄ8$HCøTḄ-extern"஺ù⛲Ḅ3*(ᦪ.ᢥ᯿CøTjkQR(Ḅ஺ᵫNQRÀḄ8$-C++¬-4ý×ᵨCᦪ஺C++þ{UKCÿᣚᢣextern“C”ᩭ⚪஺15.ᐵᑁḄ⚪sizofOḄᘤḄ!"#$%&'(Ḅឋ*+ᦪ-.᪀01ᐸ3᪘56789*ᙢᙠᯠ=>?஺!"ᙠ+#$@AḄᑁ+ᜐᳮᘤ◤⌕FGHᑁ@IᯠJ+Ḅᑁ@K◤⌕LH@஺16.constchar*p,char*constp;ḄMN᝞PconstQRḄST+ᑣconstV3ᵨᩭX⛲ᢣ┐ᡠᢣᔣḄ]^+ᓽᢣ┐ᢣᔣ#`^I᝞PconstQRḄaT+constV3X⛲ᢣ┐bc+ᓽᢣ┐bc3`^஺17.maindᦪ᡻fg+hi᡻fjklṹnᫀᐰqrḄ᪀⌼dᦪiᙠmaindᦪtg᡻f஺

9318.uᚮw᪘ḄMN஺᪘M0stack-ᵫᘤᑖzu{+{dᦪḄ|ᦪ}+q~]^Ḅ}஺ᚮ:Lᵫ'(ᕒᑖzu{+'(ᕒu{+'(.9*ᵫOSᦈ஺19.ᐰq]^wq~]^ᙠᑁ3ᔲᨵMNn᝞Pᨵ+3jkMNn.ᐰq]^ᙠ☟᝱ᦪ-M+q~]^ᙠ᪘஺20.ᚮL3ᵫjk!"Ḅ?.ᨵᦈᚗ21.*switch஺Ḅ|ᦪ3:.switchḄ|ᦪ*#஺22.᝞ᵨL¡Ḅᐰq]^nஹ9ᵨᵨᜮᦻ¥Ḅ¦§+¨9ᵨexternᐵ©ª+᝞Pᵨᵨᜮᦻ¥¦§ᩭᵨ«ᙠᜮᦻ¥¬Ḅᐰq]^+Ꮇ¯°±]^ᑏ┯$+±kᙠ´µi¶┯+᝞P¯ᵨextern¦§ᵨ+Ꮇ¯·$¸᪵Ḅ┯º+±kᙠ´µi¶┯+Jᙠ»¼´µ¶┯23.ᑁḄᑖz¦§ᑖz¦§ᨵ½¾+1ஹ☟᝱M+3ᙠ'(Vᑖz¿Ḅ+ᙠ᦮Áf´µÂᙠ+᝞ᐰq]^ஹ`^஺2ஹ᪘?ᑖz+dᦪᑁḄq~]^V3ÃᑖzḄ+ÄᑖzḄᑁÅ᧕ᨵ▲஺3ஹᚮ?ᑖz+¨È᝱ᑖz+᝞ᡃÊᵨncw,mallocᑖzᑁ+ᵨdelete,freeᩭu{Ḅᑁ஺

9424.#include<>w#includeᨵjkMNn#included,ᘤÃ᪗ÎÏÐÑÒÓÔÕ#include,ᘤÃᵨᡝḄ×FÐÑÒÓÔÕ25.#ifldefined(AFX_---_HADE_H)#define(AFX_--_HADE_H)……#endifFᵨn■Ù7ᜮᦻ¥ÚÛÜᵨ஺26.ᙠLÝḄ᎛⌕ßàjkn~ᑖḄáâ|w᦮⊤ä§Âåæᵨççèᩭ+éê9⚜ᧇḄ┯ºíî27.ᦪïᙠdᦪ|Ḅ᎛ið]#jk?ᦪïᙠ|i]ᡂᢣ┐஺28.òóiᡭÒwᐵõḄ3᪗ÎḄᦻ¥3?(1)᪗Îᐭ--©ø--stdinফ᪗Η—ûüᘤLstdout(3)᪗Î┯--ûüᘤLstderr29.ᙠWin32ýchar,int,float,doubleᔜᓰ?(1)Charᓰᵨ8(2)Intᓰᵨ32(3)Floatᓰᵨ32(4)Doubleᓰᵨ64

953O.strcpy0memcpyOḄstrcpyOmemcpyOᵨᩭ,strcpy஺'\0’$%&'mcmcpy஺()ᢣ+Ḅ,-஺31./01212Ḅ&34ᵨ56sheof76ᨵ9:;ᵨ12<ᢣᓫ>&12‘\0'$%&4ᵨ56sizeof76ᓰD⁚ḄFGHI஺32.JKᐰMN2ḄOPQᐰMN2RST᜜VN2&W<ᙠYᦪ᜜V+[ḄN2&W\]D>^_`ᦻb&WcFdDefgᦋiḄj&k]ᦪlᐳn&';okpᳮ&᧕stuv;ᑮḄ┯y஺33.z$staticḄ{ᵨ|ᵨ(1)YᦪᑁstaticN2Ḅ|ᵨTYᦪ&;]autoN2&N2ḄᑁFfᑖDe&ᐸjᙠeᵨᢝdeḄj(2)ᙠᙽᑁḄstaticᐰMN2fᙽᑁᡠᵨYᦪ&';fᙽ᜜ᐸWYᦪ(3)ᙠᙽᑁḄstaticYᦪfDᙽᑁḄᐸWYᦪᵨ&>YᦪḄ4ᵨf▲ᑴᙠ¡WḄᙽᑁ(4)ᙠ£¤ḄstaticᡂᕒN2\]᦮>£ᡠ¨ᨵ&©£Ḅᡠᨵ©ªᨵD«(5)ᙠ£¤ḄstaticᡂᕒYᦪ\]᦮>£ᡠ¨ᨵ&>Yᦪ;ᦈthisᢣ┐&±£ḄstaticᡂᕒN2஺34.z$constḄ{ᵨ|ᵨ(1)²³´D>N2fᦋN&4ᵨconstᐵ·஺ᙠ+[constN2&¸1◤⌕©W»¼½¾ᓄ&TiÀÁᨵÂÃÄÅᦋNWÆ(2)©ᢣ┐ᩭ/&ᢣ+ᢣ┐ÇÈTconst,Rᢣ+ᢣ┐ᡠᢣḄᦪlTconst,ᡈÊὅᢣ+Tconst(3)ᙠD>Yᦪ¡¤&constg⛲ÍÎ&⊤¡WÐᐭÎᦪ&ᙠYᦪᑁV;ᦋNᐸj(4)©]£ḄᡂᕒYᦪ&Òᢣ+ᐸTconst£Ó&ᑣ⊤¡ᐸ1Yᦪ&;gᦋ£Ḅ

96ᡂᕒN2(5)©]£ḄᡂᕒYᦪ&ᨵ᎛()ᢣ+ᐸÖ×jTconst£Ó&4ØᐸÖ×j;T“Új”஺35.9:<ᢣ┐ÜÜÝ©ᢣ┐ḄᳮÞᢣ┐N2&N2ßàFáᑁFᙢᙬᢣ┐N2Ḅ£Óäå]ᐸᢣᔣḄᦪl£Ó&ᙠᡠᢣᦪl£Óçè*ᢣ┐N2ḄᱯQYᦪᐭðḄᢣ┐ᢣ┐Yᦪ<ᢣYᦪḄÖ×jᢣ┐£Ó஺38.JKDebug᱐ÇRelease᱐ÇḄDebug᱐Ç<õ᱐Ç&Release᱐Ç<øùúᵨᡝḄᨬýþõḄ᱐Ç,39.ᢣ┐Ḅÿᐺᵨint*p[n];——ᢣ┐ᦪᐗᙳᢣᔣ᦮ᦪḄᢣ┐஺int(*)p[n];---pᢣᔣ%&ᦪḄᢣ┐'%&ᦪᨵn᦮ᦪ஺int*pQ*--------+ᦪ,-ᢣ┐ᢣ┐ᢣᔣ.-Ḅ/஺int(*)p0*----pᢣᔣ+ᦪḄᢣ┐஺

974O.static+ᦪ123+ᦪᨵ4567static+ᦪᙠᑁ:;<ᨵ%=23+ᦪᙠ>?ᵨ;&ᢝ%=AB41.ᜐᳮᘤ᪗H#errorḄIḄJ45KLMNOPQ%ᩩ┯TUVW;XYZMN஺42.[\]^_]^`a%bcd%efgᵨhᩭj`a;43.45Jk⊝mn᪛KLpqr᪛sJk⊝mn᪛tupqr᪛Ḅvwx/Ḅyz/{ᜧ}144.memset^nemcpyḄ67memsetᵨᩭz%~ᑁ:ᐰ%ᵨᙠzcdḄᓄ'\0'omemcpyᵨᩭᑁ:ABABᦪ_ḄzᢣcABḄᦪw;45.᝞ᡭᓺQᦻḄᦻ¡¢ᦻḄ£KᫀLcout<<_FILE_;cout<<_LINE—;—FILE—¥_LINE_J¦§⚜cd©'©W{Jᙠᦻ;cdḄtJᵫMNᘤcdḄ஺

9846.%ᓫᔣ¬⊤{®⍝ᜮ⁚²%ᢣ┐ᢣᔣᐸ;Ḅ%⁚²´᝞ᑤ◀'ᢣ┐ᢣᔣḄ⁚²·'ᢣ┐ᢣᔣḄnext⁚²/copyᑮ¹⁚²·nextᢣᔣnext->next,Wº»ᑤ◀¼nextᢣᔣḄ⁚²஺47.do.....while¥while........doᨵ4567Kஹ%¾¿%ÀÁᑨû%ᑨûÁ¾¿48.ᜮᦻḄÄᵨJ45KL%ஹ3Åᜮᦻᩭ?ᵨÆÇÈ஺ᙠjÉÊᔠÌṹ{aÎᡈ{ÐÑᔣᵨᡝÓÔ<⌕ᔣᵨᡝÖ×ᜮᦻ¥mᑴḄÆᓽ஺ᵨᡝ<◤⌕ᢥ᯿ᜮᦻ;ḄÝÞßàᩭ?ᵨÆÇÈt{áᐵãÝÞä5åæḄ஺MNᘤçèÆ;ÖéêḄÌṹ஺mஹᜮᦻÈëì_íᐰîï஺᝞ðÝÞ>åæᡈ>gᵨOᐸ`ñ1ᜮᦻ;Ḅßà{%òMNᘤóçᢣQ┯T'%[ᓫḄôᑣÈᜧᜧö÷øùᕒ?ûஹᦋ┯Ḅýþ஺49.45᪗Ðᜮᦻsᨵ_ÿḄ᪀#ifndef_INCvxWorksh#define_INCvxWorksh#ifdef_cplusplusextern"C"{#endif/*.*/#ifdef_cplusplus#endif

99#endif/*_INCvxWorksh*/ᜮᦻḄ#ifndef_INCvxWorksh#define_INCvxWorksh#endifḄᵨ■ᵨ஺☢ᔣ#$Ḅ%&'C++(ᢝ*ᦪ,'-./0%&Cᑣ2(ᢝ஺*ᦪC++3ᙠsymbol5Ḅ678C%&Ḅ29஺:᝞'Ꮇ=>?*ᦪḄ@Avoidfoointx,inty;B*ᦪcᘤ3ᙠsymbol5Ḅ67_foo,-C++ᘤᑣDEFG_fooJntJntHIḄ67஺_fooJntJntJ᪵Ḅ67ᒹMN*ᦪ6O*ᦪPᦪᦪQRIAST'C++UὃJWᑴᩭZ[*ᦪ,Ḅ஺NZ[COC++Ḅ\ᔠ/'C++^_NC`abᣚᢣefgextern"C"ᩭh67ᓛjk⚪'*ᦪmnopqextern"C"3'ᑣᘤUDᢥ᯿C%&Ḅt0uB*ᦪ_f஺஺'J᪵C%&UvwᵨC++Ḅ*ᦪN஺50.xyᑁ{ᑖjt0R}~Ḅ1☟᝱{ᑖj஺ᑁ{ᙠ/Ḅ᎛Uᑖj'Jᙽᑁ{ᙠ/Ḅ᦮?{ᙠ஺:᝞ᐰQ'staticQ஺2ᙠ᪘q஺ᙠ᡻*ᦪ'*ᦪᑁ¢QḄ{ᓫᐗvᙠ᪘q'*ᦪ᡻¥J¦{ᓫᐗ§¨©ª஺᪘ᑁ{ᑖj«ᑁ¬ᜐᳮᘤḄᢣ°±஺3ᚮqᑖj'´µ¨᝱ᑁ{ᑖj஺/ᙠḄ᎛ᵨmallocᡈnewᵭ¾¿ÀÁÂḄ

100ᑁ{'/ᕒ§ÄÅÆᙠÇᵨfreeᡈdelete©ªᑁ{஺¨᝱ᑁ{ḄF{ᵫ/ᕒhe,ÊᵨËÌᮣÎ'Ïk⚪ÐᨬÁ஺51.int*(*fh)(int*p=0)=0ÒÓÔÀÕ'2?ÖᑖÓÔfn*ᦪᢣ┐'B*ᦪᨵ?int*ḄPᦪ'ÙÚint*Û?0⊤Ý*ᦪḄPᦪÞßà'Ûá?0⊤Ýâ*ᦪãä*ᦪ52.%åfor(;1;)ᨵÓÔk⚪}ÓÔÀÕè▲êë'Owhileপí9஺53.COC++ᨵÓÔ29WᑴqC☢ᔣ./Ḅ(ÏCÐvᑏ☢ᔣ#$Ḅ/)ÒC++☢ᔣ#$Ḅ'^_NI஺Ï'C++ᑏ☢ᔣ#$Ḅ/ðCñ᧕〉ᵨḄtᔣC〉ᔠ⌕õöṹøùúḄ'ᦔ᳛ýḄþᔠ'᝞ÿᐭC++〉ᔠḄᩖḄllinux᪶ᜧᑖcᑏḄᦔ᳛⌕᩽஺!"#$%&'(C++)c*++,./C++cḄ0123456c+76C++ᕖ,C++)Cᩭ.᡽ᐙḄ<=>*+ᡠ&@ᙠCB☢DEF+G@ᡂ+C++CJKL᪀ᓄOPJKC++☢ᔣRSOPJK஺LUPATUVWn*r2C/M8fC++XYGRS75ZPXYG[Ḅ\]75^_Ḅ\]஺`ஹPbᑖ᪆⚪1.fᩭPbgᡭᓺ“WelcomeMSRAsia"ᦋk┯m#include#includcchar*GetName(void)(//Toreturn“MSRAsia”Stringcharnamc[]="MSRAsia";returnname;)voidmain(intargc,char*argv|])charname[32];

101//Fillinzerosintonamefor(inti=0;i<=32;i++){name[i]=*\0*;}//copy“Welcome"tonamename=uWelcome'1;//Appendablankcharnamc[8]=uM;//Appendstringtonamestrcat(namc,GctNamc());//printoutprintf(name);}pqᦋkB#include#includc#include//mallocrᦪḄᜮᦻchar*GctNamc(void){//Toreturn“MSRAsia“String//charname|]="MSRAsia";char*namc=(char*)malloc(strlcn(nMSRAsia")+1);//ᙠrᦪᑁwxḄyzᙠrᦪL{|@}~+᝱ᑖᑁstrcpy(name,HMSRAsia");returnname;}voidmain(intargc,char*argv஺){charname[32];//Fillinzerosintoname//for(inti=04<=32u++)for(inti=0;iv=31;i++)஻ᦪ{namc[i]=*\0t;}//copy“Welcome"toname//name=nWelcome'1;strcat(namc,"Welcome");஻J┯m,ᵨstrcat//Appendablankchar//name[8]=Hstrcat(name,*'H);஻ᡈὅname[8]=*,;name[9]='\0';//Appendstringtonamechar*p=GetNameO஻wxFᢣ┐ᢣᔣ᝱ᑖḄᑁᵨB◤ᵨfreeJD

102strcat(namc,p);free(p);//printoutprintf(name);2.┯voidtestl0{charstring[10];char*strl=,,0123456789H;strcpy(string,strl);}pq⊤☢O5┯m஺¡᝞£stringᦪ¤¥⊤¦ḄḄ§2¨F@©ᨵ«ᑮ¥஺ᨬ¯wxcharstringW],¨᪵ᨬBFᐗ²%&³L´'\0';voidtcst2Q{charstring[10],stri[10];fbr(int1=0;I<10;I++){strip]='a';)strcpy(string,strl);}pqstrcpyµᵨ┯mstrcpy¶ᨵ⍗ᑮ¸´Ḅ¹L{7strl©ᨵL´᪗»¼½strcpyrᦪ¾¿5ÀÁstrl[9]=ஹ0:¨᪵@kÂ+஺voidtcst3(char*strl){charstring[10];if(strlen(strl)<=10)(strcpy(string,strl);)}pq¨Ã(ÄÅ⍝ᦋ┯⚪Ḅ┯m+஺strlcn(strl)Ç(ᩭḄ5ᒹÉL´'CTḄ᝞£strlʯ10F+1L´string@Ë5ᑮL´+஺%Ìstrlen(strl)<=10ᦋstrlen(strl)<10o3.┯#defineMAX_SRM256DSNgccSRM_no()

103staticintSRM_no;inti;for(I=0;IvMAX_SRM;I++,SRM_no++)(SRM_no%=MAX_SRM;if(MY_SRM.state==IDLE)(break;})if(I>=MAX_SRM)return(NULL_SRM);elsereturnSRM_no;)pqEF┯m1,SRM_no©ᨵÎ2,ᵫGstaticḄÐ/µrᦪᡂ5%Yᐭ(ᓽ5%⚜ÓL£)rᦪSRM_n஺yzDᙠPbḄᐰÕ³WÖ×ØÙᵨḄ|᎛Û%&Üᢝ¤ᩭḄ஺¨ÞßᣵstaticÐ/஺4.á(f☢âṹÖḄᡠᨵ┯m./q&fâṹäF᎔b᝞"abed”᎔bBy"deba”#includeHstring.h"main஺(char*src=nhello,world";char*dest=NULL;intlcn=strlen(src);dest=(char*)malloc(len);char*d=dcst;char*s=src[len];while(lcn—!=0)d++=s—;printf("%s",dcst);return0;)pqᐳᨵ4F┯mintmain஺{char*sre="hello,world";intlen=strlen(src);char*dest=(char*)malloc(len+1);//⌕ᑖF~èchar*d=dest;

104char*sï&src[lcn-l];஻ᢣᔣᨬBFwhile(len—!=0)*d++=*s--;=0;஻´⌕ÿ'\0’printf(u%snu,dcst);free(dest);//ᵨ!⌼ᡂᑁ%&'☄dcst=NULL;஻■/012ᢣ┐return0;}5.89:;ṹᨵ>?9⚪AintmainQ{chara;char*str=&a;strcpy(str,nhelloH);printf(str);return0;}M;NᨵOstrᑖQᑁ%RST1UV9⚪WᙠRYZ[\]^ᑴ`YZ[\abᢣ┐ᡠᢣᙢᙬ஺gᯠijklWmnopOqr`sᑁᙠtᑏvwxyz{|஺6.☢ḄYyzᨵ>?┯ᦋjswap(int*pl,int*p2){int*p;*p=*pl;*pl=*p2;*p2=*p;)MAᙠswᦪpYZ“2”ᢣ┐ᨵiᢣᔣwxyzsḄ{|஺yzᦋOAswap(int*p1,int*p2)(imp;P=*pl*p1=*p2;*p2=p;}7.ᢣW:ᑡyzᨵ>?┯:voidtest2()

105charstring[10],stri[10];inti;for(i=0;i<10;i++){strip]='a';)strcpy(string,strl);)MA⚪2,᝞n☢ὅᢣW[\ᦪ¡strl¢ᙠᦪ¡ᑁm£i¤3ᑖ᝞n☢ὅᢣWstrcpy(string,strl)¥ᵨ¦§strlᑁ%¨^ᑴᑮstringᑁ%¨ᡠ^ᑴḄ[⁚ᦪᐹᨵ¢k¬ឋi¤7ᑖᙠ®¯Ạ±ᢣW²ᦪstrcpy³´µ¶Ḅ¤10ᑖstrl¢ᙠᦪ¡ᑁm£:pOstrlḄ%·OAឃ¹ºᐜ¼½},Nᨵ\0ீ[\]m£\),ᡠ¢m£strcpy(char*s1,char*s2)¿Ḅ³´ÀᳮÂÃs2ᢣᔣḄᑁ%⌲Z[\ÅᑮsiᡠᢣᔣḄᑁ%ÆᑮÇᑮ''0’,pOstrlmÈNᨵᡠᐹᨵ¢k¬ឋ¢É⍝¿Ë☢ÌSÅ>?ÍÍ஺jk᝞:voidtest2Q{charstring[10],strl[10];inti;fbr(i=O;i<9;i++){strlfi]=k+i;//ÎabcdefghiÏФ[\ᦪ¡)str[iL\0"/ѱm£\strcpy(string,strl);}8.#includcmainQ{intc[3][3]={U,3,4,5,6,7,8,9};fbr(inti=0^<3;i++)fbr(intj=0;j<3;j++)printf(H%ld

106u,&c[j]);printf("-------------------------

107M);printf("%ld

108”,(c+1));printf(n%ld

109n,(*c4-l));printfC%ld

110H,&c[0][0]);printf(n%ld

111",**c);printf(H%ld

112n,*c[O]);if(int(c)==int(*c))printf("cqul”))O>?c,*cḄÐÒÓ(c+1),(*c+l)ḄТÓc,*c,**c,;⊤>?ÕÖ×ØὃMᫀA

113CÜYZᐗÞḄᙢᙬ*CÜYsᐗÞḄ✌ᙢᙬᐸáÜYsᐗÞḄᙢᙬâÜYZᐗÞḄᙢᙬãä᧕ᳮ஺**cæ⚞ÜYZᐗÞ஺O>?c,*cḄÐÒÓ×intcpOÆèᵨc⊤éᦪ¡c[0][0]printf("%ld

114",*c[O])îïðRᢣ┐ñᑮᦪ¡ᜮ஺int(*c)⊤écOḄÐO1,ᡠÒÓ஺ᦪ¡cḄ%éÕ᝞:A(óᘤsõᐜ%Ḅ)c[0][0]c[0][l]c[0][2]c[l][0]c[l][l]c[1][2]c[2][0]c[2][l]c[2][2]cYZö÷ᦪ¡øá▭±úYZᢣ┐Vb¢`sûÑஹûýþᓽC++ஹC-,++cஹ-CᐕḄCᦪᢣ┐ḄᦪḄ✌ᙢᙬᓽ!"ᐗ$Ḅ✌ᙢᙬ(&'*c),&'!"!ᐗ$Ḅᙢᙬ(&c[0][0])./0ᡂᦪḄ"ᢣ┐஺*c!"ᐗ$Ḅ✌ᙢᙬᢣ┐./0ᡂᦪḄᑡᢣ┐஺**Cᦪ4Ḅ!ᐗ$Ḅᓽc[0][0]ᡠ/C6*cḄ7&Ḅ89:;ὅ=7>?,(@AB)(c+1):c"ᢣ┐(c+1)ᙠcḄFẠHIHᦪ"ḄᙢᙬJKᓽL&c[0][0]MᑮO(*c+1):*cᑡᢣ┐(*c+1)ᙠ*cḄFẠHIHᦪᐗ$ḄᡠᓰḄJKᓽLMᑮO&Q)*]LR(c+1)6(*c+l)Ḅ7&O9./VWṹᨵZ[\⚪^structTest(Test(int){}TcstQ{}voidfun(){});voidmain(void){Testa(l);a.funQ;Testb();b.fun();}rMsbtuv┯஺ᢥyz᪀⌼}ᦪtu~◤⌕I஺10./VWṹᨵZ[\⚪^cout<<(true?l:nr,)<>temp;unsignedintconstsizc2=temp;charstr2[size2];

115rstr2tuv┯sizc2ᘤ¢£¤sRᦪtu⌕¥JK¢¤s஺12.¦§¨/V;for©ªḄ«¬for(i=0;i

116;<54sizcof=>?@ABC>?@DEFGHIᡂKLᘤᨵᐵḄOP஺15ஹsizeofRᵨᙠT᪀ḄVWXY☢ḄT᪀

117return;p=realloc(p,2048);//§¨¾¿,ÁÂᑖ½ᑮ2Kif(NULL==p)return;}A:p=malloc(1024);Rᑏᡂ=0;-i)//Ýᔣßᔊarrayᦪ{cout<array஺ᐸ¥vector::size_typeæFã

118unsignedint,ᓽèCéᦪ4᪵êëtPḄi0@íî1D\tᡂᨬᜧḄ᦮ᦪïðêëᜫÛòᑴ஺ôஹ>õ⚪1.ᵨöFãᑏ]swap(x,y);<#defineswap(x,y)x=x+yÿy=x-y;X=x-y;2.ᣚḄᵨ஺ᓽa=3,b=5,ᣚa=5,b=3;:ᨵᵨ!"!ᵨ#$ᡈ)a=a+b;b=a-b;a=a-b;ora=aAb;//'()int,char..b=a*b;a=aAb;oraA=bA=a;

1193.ᑏ,ᦪintfun(char*p)ᑨ/0123ᔲ56ᦻ3861,3860,9┯86-1intfun(char*p){intlen=strlen(p)-1;char*q=p+len;if(!p)return-1;while(pḄ0⁚@A0⁚ᣚB0⁚@0⁚ᣚ஺#includevoidS*pchl,char*pch2)charchSwap=*pchl;

120*pchl=*pch2;*pch2=chSwap;)//ᦪTᢥ0⁚VWvoidHtonl(int*piParam){char*pch=(char*)piParam;S)`S)`)intmainQ{inti;scanf(n%dn,&i);printf(ubeforeinvert,iis:0x%08x

121"j);printf(nafterinvert,iis:0x%08x

122n,i);return0;

1235.ᑏ,ᦪop<012qḄ‘\t’sᣚᡂA'*','\tᦪv஺᝞chat*p="ht\thds£\t\ttt\tfdsdfsw\tew\t"sᣚp="ht****hdsf********tt****fdsCltS'Wointmain஺{char*p=nh\te\tll\ton;char*ptempl=p;intcount=0;printf(HBefbreChange:%s

124H,p);while(,\0,!=*ptempl)(if(,\t,==*ptempl){count++;}ptempl++;)intsize=strlen(p)+count*3+l;char*q=newchar[size];char*ptemp2=q;while(*p!=,\0,)

125if(*p=='\t)for(inti=0;i<4;i++){*q='*'`q++`)p++;}else(*q=*p;q++`p++`)}*q='\0'`printf(uAfterChange:%s

126n,ptemp2);return0;

1276.ᑏ,ᦪx9᦮ᦪᦪyqBᜧḄᦪᫀ|constintMINNUMBER=-32767;intfind_sec_max(intdata஺,intcount){intmaxnumber=data[0];intsec_max=MINNUMBER;for(inti=1;imaxnumber){sec_max=maxnumber;maxnumber=data[i];)else{if(data[i]>sec_max)sec_max=data[i];returnsec_max;

1287.}ᑏᵨC~opḄn▤▤⚪Ḅ⌴!::longintfact(intn)(If(n==O||n==l)Return1;ElseReturnn*fact(n-l);)8.Bᑖx!1)⌴op|intBScarch(clcmtypcaQ,clcmtypcx,intlow,inthigh)/*ᙠ;5low,5highḄᦪyaqᢚxᦪTᐗx*/(intmid;if(low>high)return-1;mid=(low+high)/2;if(x==a[mid])returnmid;if(x

1292)⌴op|intBSearch(elemtypea",keytypekey,intn){intlow,high,mid;low=0;high=n-l;while(low<=high){mid=(low+high)/2;if(a[mid].key==key)returnmid;elseif(a[mid].key2|⌴!|intf(intn)

130inti,s,sl,s2;sl=l;/*slᵨf(n-l)Ḅ*/s2=l;/*s2ᵨf(n-2)Ḅ*/s=l`fbr(i=3;i<=n;i++)(s—si+s2;s2=sl;sl=s;)return(s);)⌴!|Intf(intn){If(n==l||n==2)Rerurn1;ElseRerutnf(n-l)+f(n-2);

13110.ᑈ᣸W:voidBubbleSort(elemtypex[],intn)//¡ᩖ£50(n*n);{inti,j;elemtypetemp;for(i=l;ix[j+l].key){temp=x[j];x[j]=xg+l];x[j4-l]=temp;//⊡ᐙᦋ§Ḅᑈ!|voidBubbleSort(elemtypex[],intn){Inti,j;BOOLexchange;஻©ªᣚ᪗¬for(i=l;i

132Exchange=false;For(j=n-l;j>=i;-j){If(x[j]>x[j+1D{x[0]=x[j];XD]=xO+1];xo+i]=x[0]`Exchange=true;//¼½¾ᣚ¿À᪗¬5Á.))if([Exchange)஻5¼½sᣚÂÃÄÅ!return;)}11.C~ᦻÇÈᑏ#include"stdio.h"main()FILE*fp;

133charch,[10];scanf(n%sn,);if((fp=fbpen(Jw")NULL){printf(ncann*topenfilenn);exit(0);)ch=getcharQ;while(ch!'#')(fputc(ch,fp);putchar(ch);ch=getcharQ;)fclose(fp);)12.ËᐭA᦮ᦪ⌕ᢥᵫÏᑮᜧḄÑWË9஺#includevoidmain()inta,b,c,d,t;

134scanf(”Ód%d%d%d”,&a,&b,&c,&d);if(a>b){t=a;a=b;b=t;}if(a>c){t=a;a=c;c=b;}if(a>d){t=a;a=d;d=t;}if(b>c){t=b;b=c;c=t;}if(b>d){t=b;b=d;d=t;}if(c>d){t=c;c=d;d=t;}printf(M%d%d%d%d

135H,a,b,c,d);ᑈᦪy:#includevoidmainQinta[4],i,j,t;for(i=0;i<4;i++)scanf(H%dn,&a[i]);for(i=l;iீ4;i++)fbr(j=0;j<4-i;j++)if(a[j]>a[j+l]){t=a[j];a0]=a0+l]`a[j4-l]=t;}for(i=0;i<4;i+4-)printf(n%d",a[i]);

13613.ᡭᓺ9ᡠᨵḄ“ÛÜÝᦪ”ᡠÞ“ÛÜÝᦪ”3ᢣ3ßᦪᐸᔜßᦪ0â@ãäåæç஺main஺{inti,j,k,n;printf('"watcrflower'numbcris:");for(n=100;n<1000;n++)(i=n/100;/*ᑖ9èß*/j=n/10%10;/*ᑖ9ᓝß*/k=n%10;/*ᑖ9ß*/if(i*100+j*10+k==i*i*i+j*j*j+k*k*k)(printf("%-5d",n);))printf("

137");}

13814.ᵨ⌱ë)10᦮ᦪ᣸W஺#include#defineN10mainQ(inta[N]={0};inti,j,min,t;printf("

139");for(i=0;i

140Youinput:");for(i=0;i

141");for(j=0;ja[i])min=i;

142if(j!=min)t=a[j]`a[j]=a[min];a[min]=t;))printf("

143aftersorted:");for(j=O;j

144a[i]='\O';printf(n%s

145*\a);)16.ᑏ,ᦪËᐭᓝñ§ᑴᦪË9óôḄᓝ§ᑴᦪ஺#includcvoidmain(){charb[]=M0123456789ABCDEFn;longintn,x;intiõ40];printf(M

146Pleaseinputn=H);scanf(M%ldn,&n);x=n;i=0;whUe(x>0){a[i]=x%16;x=x/16;i++`)while(i>0){printf(H%cn,b[a[i-l]]);i)

147printf("

148");17.ᨵn*öᡂᙌÑW᣸øù*úûüᦪ(1ᑮ3üᦪ)ýüᑮ3Ḅ*⌨9ᙌÿᑏᑡ⌨ᙌḄnᙠᐭ஺#include#definenmax50voidmainQ{inti,k,m,n,num[nmax],*p;printf(Mpleaseinputthetotalofnumbers:n);scanfC%d”,&n);p=num;fbr(i=0;i

149if(*(p+i)!=0)k++;if(k==3){*(p+i)=0"k=0;m++;)i++;if(i==n)i=0;)while(*p==0)p++;printf("%disleft

150",*p);)18.ᐭᨴ567ᨴḄ8ᦻᨴ:;᝞ᐭ“3”ᑣ“March"⌕Dᵨᢣ┐ᦪIᜐᳮ஺voidmainQ{intn;char*name[12]={"January","February","March”,“April","May","June","July","August","September","Octobe["November","December"};scanf("_d”,&n);

151printf(n%s

152H,name[n+l]);19.bcdᦪIefᑡᐗhiᣚkᑮmcdᦪI஺#includevoidmainQ{int[2][3]={{l,2,3},{4,5,6});aintb[3][2],i,j"printf(Marraya:

153n)for(i=0;i<=l;i++)(for(j=0;j<=2;j++){printf("%d"[i]O]);>abvi])=a[i][j]"wxyz{ᣚ|ᕖ~)printf("

154");fprintf(narrayb:

155H)for{i=0;i<=2;i++){fbrg=0;j<=2;j++)printfC%5dn,b[i][j]);

156printf("

157";20.ᵨᢣ┐ḄᦪᦪᦪᐭḄ᦮ᦪᢥᜧ஺#includevoidmainQ{voids*pl,int*p2);inta,b;int"pointer,*pointer_2;scanf(n%d,%dn&a,&b);5pointer_l=&a;pointer_2=&b;if(a

158%d,%d

159u,a,b);fvoids*pl,int*p2){inttemp;temp=*pl;

160*pl=*p2;*p2=temp;)21.ᦻᨵI᦮ᦪ⌕D᣸ᑮmᦻᫀvoidOrdcr(vcctor&data)//᣸{intcount=data.sizeQ;inttag=false;for(inti=0;idataQ+1]){tag=true;inttemp=data[j];data[j]=dataQ+1];data[j4-l]=temp;})if(!tag)break;)}voidmain(void)(vcctordata;ifstreamin(nc:\\data.txtH);if(!in){cout<<,,!H;exit(l);}inttemp;while(lin.cofQ)

161in>>temp;data.push_back(tcmp);}in.closcO"Order(data);ofstrcamout(Hc:\\result.txt");if(!out){cout«,T,;exit(l);)for(i=0;iiCount)iCount=iTemp,cpDest=cpTcmp;if(!*cpSource)break;}++cpSourcc;returncpDcst;

16223.«ᑏCᦪ7ᦪᙠ¬Ḅᑁk¯°±²¬Ḅ³´µ7ᡠᙠ·¸²¹º஺intsearch(char*cpSource,intn,charch)(inti;for(i=O;i#include#includeintmainQ(charstr|ÂHABCD1234efghH;intlength=strlen(str);char*plstr;char*p2=str+length-1;while(pl

163u,str);system(npausen);return0;

16425.ᨵᑖᦪᑡ1/2,1/4,1/6,1/8……ᵨᦪ¾ᵨḄ»¼,DÇᦪᑡ½20⚗Ḅf#includedoublegetValueQ(doubleresult=0;inti=2;while(i<42){result+=1.0/i;஻⌕Êᵨ1.0Ë◀ᦪÍᵨ1,ᔲᑣÏÐbÑÒÓᓄᡂ᦮ᦪᓽ0.000000i+=2;}returnresult;}intmain஺{printff'resultis%f

165”,getValueQ);systcm(npauscn);return0;26.ᨵᦪIa[1000]kÖ0-1000;⌕D×◞cᦪᑤᣵᦪᑮÛÜÝÞßàáᜮãäåeDᨬæᑤᣵḄᦪḄçèé᪗·¸஺ë7ᦪ;{0,1,2,3,4,5,6,7}0->1->2(ᑤ◀)->3->4->5(ᑤ◀)>6->7->0(ᑤ◀)᝞ÇÞßìᑮᨬᦪæᑤ◀஺»¼1ᦪI#includeusingnamespacestd;#definenull1000intmain஺(intarr[1000];for(inti=0;i<1000;++i)arr[i]=i;

166intj=0;intcount=0;whilc(count<999){while(arr[j%1000]==nuU)j=(++j)%1000;j=(++j)%1000;while(arr[j%1000]==nuU)j=(4-+j)%1000;j=(++j)%1000;while(arr[j%1000]==nuU)j=(++j)%1000;arr[j]=null;++count;)while(arr[j]==null)j=(++j)%1000;cout<usingnamespacestd;#definenull0structnode(intdata;node*next;);intmain஺{node*headnewnode;head->data=0;head->next=null;node*p=hcad;for(inti=l;i<1000;i-F+){node*tmp=newnode;tmp->data=i;tmp->next=null;hcad->ncxt=tmp;head=head->next;head->next=p;

167whilc(p!=p->ncxt)(p->ncxt->next=p->next->ncxt->ncxt;p=p->next->next;)cout<data;return0;}»¼3:íᵨî¼#include#defineMAXLINE1000//ᐗhᦪ/*MAXLINEᐗhᦪanᐗhᦪIR0ᢣ┐ïsuffixé᪗index´µᨬḄé᪗6values´µᨬḄé᪗ðḄºstartñòóáèKô◞*/intfind_n(inta|],intR|],intK,int&index,int&values,ints=0){intsuffix;intfront_node,current_node;suffix=O;if(s==O){current_node=0;front_node=MAXLINE-l;}else{current_node=s;front_node=s-l;}whilc(R[front_nodc]!=front_nodc){printf(1,%d

168,,,a[current_node]);R[front_nodc]=R[currcnt_node];if(K==l){currcnt_nodc=R[front_node];continue;}for(inti=0;i

169currcnt_nodc=R[front_nodc];indcx=front_nodc;values=a[front_node];return0;)intmain(void){inta[MAXLINE],R[MAXTJNE],suffix,index,values,start4,I<;suffix=indcx=valucs=start=O;K=2;for(i=Ou

170u,index,values);return0;27.AfB,AfBḄᨬᜧõᐳ஺÷᝞A="aocdfc"B="pmcdfa"ᑣ"cdf*///Author:azhen#include#includc#includechar*commanstring(charshortstringQ,charlongstringQ){inti,j;char*substring=malloc(256);if(strstr(longstring,shortstring)!=NULL)஻᝞Ð...,øz´µshortstringreturnshortstring;for(i=strlcn(shortstring)-l;i>0;i-)஻ᔲᑣáèÞßùî{fbr(j=O;j<=strlcn(shortstring)-i;j++){memcpy(substring,&shortstring[j],i);substring[i]=,\0f;if(strstr(longstring,substring)!=NUI,L)returnsubstring;

171returnNULL;mainQ{char*strl=malloc(256);char*str2=malloc(256);char*commancNULL;gcts(strl);gets(str2);if(strlcn(strl)>strlcn(str2))//búḄÖ½☢comman=commanstring(str2,strl);elsecomman=commanstring(strl,str2);printf(uthelongestcommanstringis:%s

172n,comman);}28.ᙠcüýþᦪbÓᣚᡂ᦮Ḅᦪ¤atolQᔩᦪḄஹᦪatolᣚᡂ᦮ᦪᵨlongatol(constchar*nptr);#include#includeintmain(void){long1;char*str="98765432”;1=atol(Istr);printf(ustring"%sinteger"%ld

173u,str,1);return(O);29.#ᡂ$ᑡ&'***

174***************************#includeusingnamespacestd;constintn=8;main஺{inti;intj;intk;fbr(i=n;i>=1;i"){for(j=0;j

175#includeusingnamespacestd;voidsort(int*arr,intn);intmain(){intarray0={45,56,76,234,l,34,23,2,3};sort(array,9);for(inti=0;i<=8;i++)஻/0ᙠ234cout«array[i]<?஺[ὃ⇋D⚪ᔲᐰ☢]void*mymcmcpy(void*dcst,constvoid*src,sizc_tcount)(char*pdest=static_cast(dest);constchar*psrc=static_cast(sre);if(pdest>psrc&&pdest

176pdcst[i]=psrc[i];else{fbr(size_ti=0;i

17733.Z[strcpyᦪḄchar*strcpy(char*strDcst,constchar*strSrc);ᵨᦪstrcpyᦪ஺ᫀchar*strcpy(char*strDcst,constchar*strSrc){if(strDcst==NULL||strSrc==NULL)returnNULL;if(strDeststrSrc)returnstrDest;char*tempptrstrDest;while((*strDest++=*strSrc++)!=’\\0')returntempptr;))34.Z[strcatᦪḄchar*strcat(char*strDest,constchar*strSrc);ᐸ]strDest^ḄstrSrc_஺R`ᵨC++/CḄTᦪaUᑏᦪstrcatchar*_cdeclstrcat(char*dst,constchar*src)(char*cp=dst;while(*cp)cp++Q/*findendofdst*/while(*cp++=*src++);/*Copysrctoendofdst*/return(dst);/*returndst*/

178b᜜ᐸdḄᦪ_ṹ᝞$ᦪstpcpy>?9ᑮb9ᵨchar*stpcpy(char*destin,char*source);#include#includeintmain(void)(charstring[10];char*strl=nabcdefghin;stpcpy(string,strl);printf(H%snn,string);return0;iᦪstrcatghᦪᵨchar*strcat(char*dcstin,char*sourcc);#include#includeintmain(void)

179chardestination[25];char*blank=”*c="C++”*Borland="Borland”Qstrcpy(destination,Borland);strcat(destination,blank);strcat(destination,c);printf(n%snu,destination);return0;)ᦪstrchrᙠ9]jklmḄn9ᓛp<ᜐᵨchar*strchr(char*str,charc);#includc#includeintmain(void)(charstring[l5];char*ptr,c='r';strcpy(string,“Thisisastring11);ptr=strchr(string,c);if(ptr)

180printf(MThecharacter%cisatposition:%dnn,c,ptr-string);elseprintf(nThecharacterwasnotfbundnu);return0;)ᦪstrcmprsᵨintstrcmp(char*strl,char*str2);tAsiM%strl>str2,XYu>0;vVWXY0#includc#includeintmain(void)(char*bufl=naaan,*buf2=nbbbn,*buf3=ncccn;intptr;ptr=strcmp(buf2,bufl);if(ptr>0)printf(nbuffcr2isgreaterthanbufferIn")Qelseprintf(nbuffcr2islessthanbufferIn")Qptr=strcmp(buf2,buf3);

181if(ptr>0)printf(nbuffer2isgreaterthanbuffer3nn);elseprintf(nbuffer2islessthanbuffer3n")Qreturn0;)ᦪ:strncmpix9]Ḅ9yᑖ{b9rsR|ᜧ~ᑏᵨintstrncmpi(char*strlchar*str2,unsignedmaxlcn);,#includc#includeintmain(void)(char*bufl=*buf2=nbbbn;intptr;ptr=strcmpi(buf2,bufl);if(ptr>0)printf(nbuffcr2isgreaterthanbufferIn")Qif(ptr<0)printf(nbuffcr2islessthanbufferIn")Qif(ptr==0)

182printf(nbuffer2equalsbufferIn");return0;)ᦪ:strcpy>?ᵨchar*strcpy(char*strl,char*str2);#include#includeintmain(void)(charstring[10];char*strl=nabcdefghin;strcpy(string,strl);printf(,,%sn,,string);?return0;)ᦪ:strespnᙠ]jkn9lmᑁḄᵨintstrcspn(char*strl,char*str2);:

183#include#include#includeintmain(void){char*stringl="1234567890";char*string2="747DC8";intlength;length=strcspn(stringl,string2);printf(nCharacterwherestringsintersectisatposition%dnn,length);return0;)ᦪstrdupx>?ᑮḄᜐᵨchar*strdup(char*str);#include#include#includcintmain(void)char*dup_str,*string=nabcdcn;

184dup_str=strdup(string);printf(n%snu,dup_str);free(dup_str);return0;)ᦪstricmpᜧ~ᑏRrsvᵨintstricmp(char*strl,char*str2);#include#includcintmain(void)(char*bufl=nBBBn,*buf2=nbbbn;intptr;ptr=stricmp(buf2,bufl);if(ptr>0)printf(nbuffcr2isgreaterthanbufferIn")Qif(ptr<0)printf(nbuffcr2islessthanbufferIn")Qif(ptr==0)printf(nbuffer2equalsbufferIn");

185return0;ᦪ:strcmpix9{b9rsR|ᜧ~ᑏᵨintstrcmpi(char*strl,char*str2);#include#includeintmain(void)(char*bufl=“BBB”,*buf2=nbbbn;intptr;ptr=strcmpi(buf2,bufl);if(ptr>0)printf(Hbuffcr2isgreaterthanbufferIn")Qif(ptr<0)printf(nbuffcr2islessthanbufferIn")Qif(ptr==0)printf(nbuffcr2equalsbufferIn");return0;

186ᦪstrncmp:rsᵨintstrncmp(char*strl,char*str2,intmaxlen);#include#includeintmain(void)(char*bufl="aaabbb",*buf2="bbbccc”,*buf3""ccc”;intptr;ptr=strncmp(buf2,bufl,3)Qif(ptr>0)printf(Hbuffer2isgreaterthanbufferIn")Qelseprintf(Hbuffer2islessthanbufferIn")Qptr=strncmp(buf2,buf3,3)»if(ptr>0)printf(nbuffer2isgreaterthanbuffer3nn);elseprintf(nbuffer2islessthanbuffer3nH);return(0);

187ᦪstrncmpi]Ḅ9yᑖ{b9]Ḅ9yᑖrsR|ᜧ~ᑏᵨintstrncmpi(char*strl,char*str2);#include#includeintmain(void)(char*bufl""BBBccc”,*buf2=nbbbcccn;intptr;ptr=strncmpi(buf2,bufl,3);if(ptr>0)printf(nbuffcr2isgreaterthanbufferIn")Qif(ptr<0)printf(nbuffcr2islessthanbufferIn")Qif(ptr==0)printf(nbuffcr2equalsbufferIn”)Qreturn0;}ᦪstrnepy>?

188ᵨchar*strncpy(char*destin,char*source,intmaxlen);#include#includeintmain(void)(charstring[10];char*strl=nabcdefghin;strncpy(string,strl,3);string[3]"”Qprintf(n%snu,string);return0;)ᦪstrnicmpR¯°ᜧ~ᑏᙢrsvᵨintstrnicmp(char*strl,char*str2,unsignedmaxlcn);#include#includcintmain(void)char*bufl="BBBccc",*buf2="bbbccc";

189intptr;ptr=strnicmp(buf2,bufl,3);if(ptr>0)printf(nbuffer2isgreaterthanbufferIn")Qif(ptr<0)printf(Mbuffer2islessthanbufferIn")Qif(ptr==0)printf(Mbuffer2equalsbufferIn");return0;)ᦪ:strnsetx9]Ḅᡠᨵ´µ¶ᢣmᵨchar*strnsct(char*str,charch,unsignedn);#include#includeintmain(void)(char*string="abcdcf^hijklmnopqrstuvwxyz”Qcharletter=x*;printf(Hstringbeforestrnset:%snn,string);stmset(string,letter,13);

190printf(Hstringafterstrnset%sn"string);return0;)ᦪstrrchrᙠ]jkᢣmḄᨬº93)ᵨchar*strrchr(char*str,charc);#include#includeintmain(void)(charstring[l5];char*ptr,c"*r*;strcpy(string,"Thisisastring11);ptr=strrchr(string,c);if(ptr)printf(MThecharacter%cisatposition:%dnn,c,ptr-string);elseprintf(nThecharacterwasnotfbundnn);return0;ᦪstrrev

191᎔ᵨchar*strrev(char*str);#include#includeintmain(void)(char*forward="string”Qprintf(nBeforestrrevQ:%sn"forward);strrev(fbrward);printf(nAfterstrrevQ:%sn*\forward);return0;)ᦪstrsctx9]Ḅᡠᨵ´µ¶ᢣmᵨchar*strsct(char*str,charc);#include#includcintmain(void)charstring[10]="123456789”;

192charsymbol=*c*;printf(MBeforestrsetQ:%sn”,string);strset(string,symbol);printf(HAfterstrsetQ:%sn"string);return0;ᦪ:strstrᙠ]jkᢣmḄn9Ã3)ᵨchar*strstr(char*strl,char*str2);#includc#includeintmain(void)(char*strl=uBorlandInternational”,*str2="nation",ptr=strstr(strl,str2);printf(nThcsubstringis:%sn"ptr);return0;ᦪstrtodxᣚ¶doubleu

193ᵨdoublestrtod(char*str,char**endptr);#include#includeintmain(void)(charinput[80],*endptr;doublevalue;printf(nEnterafloatingpointnumber:n);gets(input);value=strtod(input,&endptr);printf("Thestringis%sthenumberis%lfnu,input,value);return0;)ᦪstrtokjkᵫᙠn"]ᢣmḄᑖ4ᑖ◞ÆḄᓫÈᵨchar*strtok(char*strl,char*str2);#includc#includcintmain(void)

194charinput[16]="abc,d”;char*p;/*strtokplacesaNULLterminatorinfrontofthetoken,iffound*/p"strtok(input,if(p)printfC%snn,p);/*AsecondcalltostrtokusingaNULLasthefirstparameterreturnsapointertothecharacterfollowingthetoken*/p=strtok(NULL,M,n);if(p)printff,%sn,\p);return0;)ᦪstrtolxᣚ¶᦮ᦪᵨlongstrtol(char*str,char**cndptr,intbase);#include#includcintmain(void)char"string="87654321"*cndptr;

195longInumber;/*strtolconvertsstringtolonginteger*/Inumber=strtol(string,&endptr,10);printf(Mstring=%slong=%ldnn,string,Inumber);return0;)ᦪstruprx]Ḅ~ᑏÕᣚ¶ᜧᑏÕᵨchar*strupr(char*str);#includc#includeintmain(void)(char"string="abcdcÖhijklmnopqrstuvwxyz”,*ptr;/*convertsstringtouppercasecharacters*/ptr=strupr(string);printf(M%snnptr);,return0;ᦪswab

196×ᣚ⁚ᵨvoidswab(char*from,char*to,intnbytes);#include#include#includecharsource[15]=MrFnakoBlmad";chartarget[15];intmain(void){swab(source,target,strlen(source));printf("Thisistarget:%sn"target);return0;)isalphaexternintisalpha(intc);ᵨ#includcᑨÚCᔲ¶ÛᦻÕÝÞßC¶ÛᦻÕa-zᡈA-ZáXYâãuᔲᑣXYã஺å//isalpha.c#include

197#include#includemainQ{intc;clrscrQ;//clearscreenprintf(HPressakey");for(;;)(c=getcharQ;clrscrQ;printf(n%c:%sletterH,c,isalpha(c)?nisH:nnotn);)return0;//justtoavoidwarningsbycompileriᦪbcmpexternintbcmp(constvoid*sl,constvoid*s2,intn);ᵨ:#includerssiæs2Ḅçn⁚ᔲVWÝÞ᝞èsi=s2ᡈn=0ᑣXYãᔲᑣXYâãu஺bcmpRéjNULL஺

198char*strstr(registerchar*buf,registerchar*sub)registerchar*bp;registerchar*sp;if(!*sub)returnbuf;while(*buf)(bp=buf;sp=sub;do{if(!*sp)returnbuf;}while(*bp++==*sp++);buf+=1;return0;

19935.ê⊤⚪9ê⊤Ḅìíì᪀structNode{intdataNode*nextQ}QtypedefstructNodeNode;Z[ê⊤Ḅᜮìíhead,ᑏ9ᦪê⊤⌮(Intel)structNode(intdata;Node*next;);//ê⊤⌮Node*linkrever(Node*head){if(head==NULL){printf(uThisisanemptylink")Qreturn0;)if(head->next==NULL)(returnhead;)Node*p,*q,*bq;p=head;

200q=p->next;p->next=NULL;while(q!=NULL){bq=q->next;q->next=p;pqQq=bq;)headp;returnhead;36.⌮9ñឋê⊤ᓽᢣᙠRôõḄêìíö=Ḅç÷$Sñឋ⊤ø¶ù@3,…%ஹ%ûüᡂ23,02,%஺ᫀvoidInvert(LinkListL)LinkListp,q,r;p=L->next;q=p->next;while(q!=NULL)

201r=q->next;q->next=p;P"qQq"r;)L->next->next=NULL;஻n9ìíᢣᔣöL->next=p;//ᜮᢣ┐ᢣᔣᨬº9ìí37.ÿ⊤⌮᣸ᑡᓽᜮᜮ஺#include#includestructstrtyp(intn;strtyp*next;};strtyp*revcrsc(strtyp*h)(strtyp*p,*b,*hd;p=h;b=p->ncxt;hd=b->ncxt;p->ncxt=NULL;for(;hd!=NULL;hd=b->next)

202b->next=p;p=b;b=hd;)b->next=p;returnb;)voidprint(strtyp*h){strtyp*p;p=hwhile(p!=NULL){printf("%4d",p->n);p=p->next;)putcharf

203,);

204strtyp*makelink(intm){strtyp*h,*p;inti;p=h=(strtyp*)(malloc(sizeof(strtyp)))p->n=l;p->next=NULL;fbr(i=l;ivm;i++){p->next=(strtyp*)(malloc(sizeof(strtyp)));p->n=i+l;if(i==m-l)p->next=NULL;elsep=p->next;)returnh;}voidmainQ{strtyp*q,*y;q=makelink(8);print(q)y=reverse(q);

205print(y);38.⊤headlhead2ᔜᨵᔠᡂ⊤ᯠᨵ஺("ᶇᡠᨵ%&ᓽ'ᜧ)*+)Node*Merge(Node*headl,Node*head2){if(headl==NULL)returnhead2;if(head2==NULL)returnheadl;Node*head=NULL;Node*pl=NULL;Node*p2=NULL;if(headl->datadata){head=headl;pl=headl->next;p2=head2;)else

206head=head2;p2=head2->next;pl=headl;)Node*pcurrent=head;while(pl!=NULL&&p2!=NULL)(if(pl->data<=p2->data)(pcurrent->next=pl;pcurrent=pl;pl=pl->next;)else{pcurrent->next=p2;pcurrentp2;p2=p2->next;if(pl!=NULL)

207pcurrent->next=pl;if(p2!=NULL)pcurrent->next=p2;returnhead;)39.⊤headlhead2ᔜᨵᔠᡂ⊤ᯠᨵ-.⌕0ᵨ⌴34567஺ᫀNode*MergeRecursive(Node*headl,Node*head2){if(headl==NULL)returnhead2;if(head2NULL)returnheadl;Node*head=NULL;if(headl->datadata){headheadl;head->next=MergeRecursive(headl->next,head2);)else

208head=head2;head->next=MergeRecursive(headl,head2->next);)returnhead;40.᝞9ᑨ;ᓫ⊤=ᨵ>Ḅ@(ABCDᵨ᪗FGᨬIJDᵨK᜜ᢣ┐)structnode{charval;node*next;}boolcheck(constnode*head){}//returnfalse:O>true:ᨵ>P஺(n)ḄQ5R=(Sᢣ┐T.⌴UVT.⌴UV,᝞Xᨵ>ḄYὅ[ᯠ\ᔠ]^_ᯠ)`boolcheck(constnode*head){if(headbbNULL)returnfalse;node*low=head,*fast=head->next;while(fast!=NULL&&fast->next!=NULL)(low=low->next;fast=fast->next->next;

209iflowfastreturntrue;returnfalse;)41.debf᪛SḄᐜijᔊᑡᑖm`ᐜjᔊ`AஹBஹDஹEஹCஹFஹGojᔊ`DஹEஹBஹGஹFஹCஹAp=ᔲDrst-ebf᪛᝞XCDstuvᳮᵫ஺᝞XDst᪀⌼{bfSḄijᔊᑡ@|ᫀ`#include"stdio.h"#include"stdlib.h”#include"string.h"#definenull0structnode{chardata;structnode*lchild;structnode*rchild;};

210//ᐜi᪛structnode*create(char*pre,char*ord,intn){structnode*head;intordsit;head=null;if(n<=0){returnnull;)else{head=(structnode*)malloc(sizeof(structnode));head->data=*pre;head->lchild=head->rchild=null;ordsit=0;while(ord[ordsit]!=*pre){ordsit++;head->lchild=create(pre+l,ord,ordsit);

211head->rchild=create(pre+ordsit+1,ord+ordsit+l,n-ordsit-l);returnhead;)//i⌴3jᔊvoidinorder(structnode*head){if(!head)return;else{inorder(head->lchild);printf(n%cH,head->data);inorder(head->rchild);)//i⌴3jᔊ

212voidinorderl(structnode*head)structnode*p;structnode*stack[20];inttop=0;p=head;while(p||top!=0){while(p)(stack[top++]=p;p=p->lchild;)pstack-top];printf(n%cn,p->data);p=p->rchild;)

213//ᦪintmainQ(structnode*head;charpre[30],ord[30];intn;gets(pre);gets(ord);n=strlen(pre);head=create(pre,ord,n);inorder(head);printff

214M);inorder1(head);printf(H

215n);

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。
关闭