C语言面试题大汇总有华为面试题

C语言面试题大汇总有华为面试题

ID:83338012

大小:5.48 MB

页数:74页

时间:2023-07-17

上传者:灯火阑珊2019
C语言面试题大汇总有华为面试题_第1页
C语言面试题大汇总有华为面试题_第2页
C语言面试题大汇总有华为面试题_第3页
C语言面试题大汇总有华为面试题_第4页
C语言面试题大汇总有华为面试题_第5页
C语言面试题大汇总有华为面试题_第6页
C语言面试题大汇总有华为面试题_第7页
C语言面试题大汇总有华为面试题_第8页
C语言面试题大汇总有华为面试题_第9页
C语言面试题大汇总有华为面试题_第10页
资源描述:

《C语言面试题大汇总有华为面试题》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

C☢⚪ᜧ4.staticᨵᵨ⌶1.▲ᑴḄᵨ2.!Ḅ"#7.$ᵨ%ᢣ┐ᨵ()1$ᵨ*+,-.ᓄ0ᢣ┐1*஺2$ᵨ-.ᓄ3415,ᦋ0ᢣ┐73ᦋᡠᢣḄ9:஺21"ᙠᢣᔣ=>Ḅ$ᵨ0?@"ᙠᢣᔣ=>Ḅᢣ┐஺8.ABCDEFḄGHᱯឋᙠᱯKDLᑁNᡂᱯKḄPQ0CDឋ%7☠ឋ9.ᐰTUTVᙠᑁ"W@ᔲᨵ()᝞Zᨵ0@()ᐰT#"ᙠ☟᝱ᦪ^_0TVᙠᚮ᪘10.@b⊝de᪛ghi᪛j@b⊝de᪛kghi᪛Ḅlmn>Ḅo9>1ᜧp111.ᚮ᪘qrst@ᵫvwxyḄzᨵ{ᦈᚗ~12.ᦪ15ᦪconstructor13.ᑈ᣸ḄDLᩖm@0n214.ᑏrfloatx%">”Ḅif஺ifx>0.000001&&x<-0.00000116.InternetᵨḄ⌕᪀tcp/ip¢ᵨ/¤¥//ᦪ^¦§/ᱥᳮ

117.InternetᱥᳮᙢᙬUIPᙢᙬ¬ᣚᵨARP(AddressFtesolutionProtocol)(ᙢᙬ¯᪆±18)18.IPᙢᙬḄ³ṹᑖ¶VᑖIPᙢᙬᵫVᑖ·ᡂ0¸U¹¸஺1º@⌕U“i¼ṹ”ᢥ¾%¿À4Á5(ᑖÂ@¾Â@¹¾஺2.ᵨᡝ¥ᐭM,N>0Å1NÆ.ÇÈÉᦪᦪ0ÊᦪᑮM¥rᦪ>0ÌᐰV¥r஺ᑏrCÍ஺Èɦ⊤0ᵨÏÐÑÒ3.15ÒswÓch()ḄÔᦪÕÖ@×switchḄÔᦪ15CÖ஺⃎ᔁ1ஹTV5ᔲUᐰTÛÜÝ×50TVÞßàᐰT஺⌕ᵨᐰT0◤⌕âᵨ"::"TV73%ᐰTäÜ0ᙠᦪᑁ$ᵨåæD0ÞᵨᑮäÜḄTV0ç1ÞᵨᑮᐰT஺9pᨵ³èᘤç0ᙠäsæᦪᑁ73KêëæäÜḄTV0᝞ᙠæÈÉìᑁjKêsæäÜḄTV0çíæTVḄᵨîᙠíæÈÉìᑁ2ஹ᝞ï$ᵨsæðñKêºḄᐰTÝ×extern73ᵨ$ᵨᜮᦻôḄõö0÷73ᵨexternᐵùú0᝞Zᵨ$ᵨᜮᦻôõöᩭ$ᵨüæᙠᜮᦻôWḄᐰTᳮ0ᎷKþÿᑏ┯ᙠ┯᝞ᵨexternᵨᎷ᪵Ḅ┯ᙠ┯ᙠ!┯3ஹᐰ$%&&'(ᙠ&)*.Cᦻ,ᒹ.Ḅᜮᦻ,01231

256&'ᙠḄCᦻ,0'static7ᩭ9:;ᐰ$%஺&'ᙠḄCᦻ,09:;Ḅᐰ$%=>?ᐸ0ABᨵCᦻ,0DE%FGHE!I┯4ஹJKfor(L1L)ᨵ3N⚪1P?3QR156Swhile஺)T஺5ஹdo….whileSwhile....doᨵ3UV?56=XYZX[\ᑨ^_Xᑨ^'_\YZ6ஹ`ᑏIaᑡcṹḄeIᑁg#includemain()(inta,b,c,d;a=10;b=a++;c=++a;d=10*a++;printf("b,c,d6%d,%d,%d",b,c,d);return0;)5610,12,1201ஹstaticᐰ$%ijkḄᐰ$%ᨵ3UV1static$l%Sjk$l%ᨵ3UV1staticmᦪijkmᦪᨵ3UV1ᐰ$%(᜜l%)Ḅp:q=\r'statics᪀ᡂ☟᝱Ḅᐰ$%஺ᐰ$%xys?☟᝱z{☟᝱ᐰ$%|ᯠ~?☟᝱z{஺ὅᙠz{஺

3ὅḄUVᙠ☟᝱ᐰ$%Ḅᵨ?᦮|Xᵫ*ᦻ,ᡂ☟᝱Ḅᐰ$%ᙠᔜᦻ,0?ᨵᦔḄ஺☟᝱ᐰ$%ᑣ▲ᑴᐸᵨᓽAᙠ(%Ḅᦻ,ᑁᨵᦔᙠXḄᐸPᦻ,0BᵨP஺ᵫ☟᝱ᐰ$%Ḅᵨ$▲Xᦻ,ᑁAB2ᦻ,ᑁḄmᦪᵨE&'ᙠᐸPᦻ,0┯஺'ᑖ᪆&'¡I¢$l%ᦋ2☟᝱%_?ᦋPḄz{ᓽᦋPḄ¤z஺¢ᐰ$%ᦋ2☟᝱%_?ᦋPḄᵨ▲ᑴPḄᵨ¦஺staticmᦪijkmᦪᵨ஺§ᙠxᦻ,஺Aᙠ|=ᦻ,0ᵨḄmᦪ¨p:2ᑁlmᦪ(static),ᑁlmᦪ¨ᙠ|=ᦻ,0p:S(஺D&ᙠ|=ᦻ,'᜜ᵨḄmᦪ¨ᙠXᜮᦻ,0p:⌕ᵨªmᦪḄᦻ,⌕ᒹ.ᜮᦻ,staticᐰ$%ijkḄᐰ$%ᨵ3UV6staticᐰ$%AGᓄX¬■®ᙠᐸ¯ᦻ,ᓫᐗ0)ᵨLstatic$l%Sjk$l%ᨵ3UV6static$l%A)G²ᓄ•X¬aX¬´µX¬¶HLstaticmᦪijkmᦪᨵ3UV6staticmᦪᙠᑁz0AᨵX·jkmᦪᙠ¸)¹ᵨ0ºᢝX·¼½2ஹḄ$l%zᙠ(ᚮ᪘)0ᐰ$%zᙠ(☟᝱U)0À᝱ᵭ`ᦪµzᙠ(ᚮ)0஺3ஹÂᨵ'ap:S(6typedefunion{longi;intk[5];charc;}DATE;structdata{intcat;DATEcow;doubledog;}too;DATEmax;ᑣJKprintf("%d",sizeof(structdate)+sizeof(max));Ḅ᡻Ķ?6___5256DATE?Xunion,%ᵨÆ.È☢ᨬᜧḄ%ÌÍ?int[5],ᓰᵨ20Ï⁚.

4ᡠ'PḄᜧÒ?20data?Xstruct,¸%ᑖÓᓰᵨÆ.´¬2int4+DATE20+doubles=32.ᡠ'¶?20+32=52.|ᯠ…ᙠÕª16Ö×ᘤaint&B?2Ï⁚¶?int2+DATE10+doubles=204ஹÙᑡS᪘ᨵ3UV1ÙᑡᐜÛᐜI᪘_ÛᐜI5ஹᑏIaᑡcṹḄeIᑁg#includeintinc(inta)(return(++a);)intmulti(int*a,int*b,int*c)(return(*c=*a**b);)typedefint(FUNC1)(intin);typedefint(RJNC2)(int*,int*,int*);voidshow(FUNC2fun,intarg1,int*arg2)(INCp=&inc;inttemp=p(arg1);fun(&temp,&arg1,arg2);

5primf("Üd

6”Jarg2);)main()(inta;show(multi,10,&a);return0;)561107ஹ`ÝIa☢cṹ0Ḅᡠ'┯p:6'acṹ?¢XÏÞß᎔᝞“abed”᎔_2“dcba”1ஹ#include"string.hn2ஹmain()3ஹ(4>char*src="hello,world";5ஹchar*dest=NULL;6ஹintlen=strlen(src);7ஹdest=(char*)malloc(len);8^char*d=dest;9ஹchar*s=src[len];10ஹwhile(len-!=0)11ஹd++=s-;12ஹprintf(,,%s,,,dest);

713ஹreturn0;14ஹ)56á16intmain(){char*src="hello,world";intlen=strlen(src);char*dest=(char*)malloc(len+1);஻⌕2\0ᑖãXÆchar*d=dest;char*s=&src[len1];஻ᢣᔣᨬ_•ÏÞwhile(len-!=0)*d++=*s-;*d=0;஻æl⌕ç\0printf("%s

8",dest);free(dest);//ᵨè,¨|êëÆ,'⌼ᡂᑁzíî☄return0;)á26#include#includemain()(charstr[]="hello,world";intlen=strlen(str);chart;

9for(inti=0;i

10:;ᦪ=>?@Aᣚᡂ᦮EḄ;ᦪatool()ᔩ>;ᦪḄGEHIJ;ᦪKatolLMN?@OAᣚᡂP᦮Eᦪᵨ2longatol(constchar*nptr);RST#include#includeintmain(void)(longI;char*str="98765432";I=atol(lstr);printf("string=%sinteger=%ld

11",str,I);return(O);)2.UV=>⚣XYᵨḄZ[;ᦪᙠC78\ᵨHI!"ᙠ0+\ᵨHI!"Jcᵨ_`a,c++fflinline3.cdedf>ghiḄ=jeklmHIJPPPiᑮind4.dᐭoᵨḄHIdpJ5.voip*ᵨqrstuJ6.vwxy*ᨵrs0zJ{|┐U~LMḄxyᔠxy;ᦪLMᔜ;ᦪdp7.`ᙽḄLM$ᙽḄdpᙠvwḄr>ᡂḄJ

12ᭆ⌕▤8.enumstring(x1,x2,x3=10,x4,x5,}x*=0x801005,0x801Of4;9.unsignedchar*p1;unsignedlong*p2;p1=(unsignedchar*)0x801000;p2=(unsignedlong*)0x810000;p1+5=;p2+5=;.⌱⚪I.EthternetedᑮInternetᵨᑮr>tuJA.HDLC;B.ARP;C.UDP;D.TCP;EID2.VotuḄA.TCPB.IP;C.ICMP;D.X.253.Windows)ᑴA.ᢣhᑡ;B.ᢣhᚮ᪘;C.ᑡ;D.ᚮ᪘;4.unsignedshorthash(unsignedshortkey)

13return(key>>)%256)hash(16),hash(256)Ḅ¡ᑖ£A.1.16;B.8.32;C.4.16;D.1.32¤.¥┯⚪1.☢RSᨵHI┯§Jinta[60][250][1000],i,j,kfor(k=0;k<=1000;k++)for(j=0;j<250;j++)for(i=0;i<60;i++)a[i][j][k]=O;N¨©7ªᑁ᜜ᣚ=2.#defineMax_CB500voidLmiQueryCSmd(StructMSgCB*pmsg)(unsignedcharucCmdNum;for(ucC^dNum=0;ucCmdNumᦪḄ%1ḄRS,¥┯§:#defineSQUARE(a)((a)*(a))

14inta=5;intb;b=SQUARE(a++);4.typedefunsignedcharBYTEintexamply_fun(BYTEgtjen;BYTE*gt_code)(BYTE*gt_buf;gt_buf=(BYTE*)MALLOC(Max_GT_Length);if(gtjen>Max_GT_Length)(returnGT_Length_ERROR;))±.²⚪1.IPPhoneḄGᳮHIJIPV62.TCP/IP´gµ¶Ḅ·R¸᪵¹pᨵHImᵨJº»`¼>\ᵨRSYᵨ½tu3.1¾gh$7¾ghᨵHI¿£ᡃÁÂÃÄÅYᵨḄr=0J4.ᑡÆ50-ḄᵯÈÉÊJËvÌÍᢈÏÐḄ☢y⚪ÑÑÑ1.ÒR$ÓRḄÔ£஺

15ÓRᢣÒRᑁḄ=>᡻Öᓫᐗ,ØÒRᑁḄÙ)!Ú.ÛÒRḄ¿£(1))ÓRm)$ᑖÜḄÝÞᓫßÒRmàᨵáâḄÝÞᓫß(2)ãឋåÒRæçÙã᡻Öè>ÒRḄé>ÓRæçØÙã᡻Ö(3)àᨵáâÒRàᨵáâḄ=>ê¶ᓫßÓRàᨵ~áâëÙìíVÒRḄáâ.(4)~î├ᙠðµᡈòÒRóᵫV~*⌕æᑖÜ$õᦈáâ÷ø~Ḅî├ùúᜧVðµᡈòÓRóḄî├஺2.xy12üýxy>ü'þஹᘤ2.HeapstackḄ«Heapᚮstack᪘஺StackḄᑖ!/#$Heap%Ḅ&ᑖ!/#$஺Stackᨵ▲Heap)ᜧḄᵫ,-.C/Ḅmalloc0ᦪᑖ!Ḅᑁ,ᓽᙠᚮ%,C++/67Ḅnew8஺9:ᙠ;<=6>?0ᦪᑖ!ᑁ,@ᙠ᪘%AB,C9:DBE9/0ᦪFᵨHIᦪḄJ⌴Lᙠ᪘%AB3.WindowsM♦Ḅᑁ,᝞OPᳮḄR4.ST.Net.NetḄUᐰឋ஺5.XᡝZ᝞O[\.Net]^_`WebService?6.OJ+;<ᘤ/a⊤᝞OcᡂḄR7.ee8MḄf9gh஺ᯠjklA9ᑁ/᜜]^Ḅ஺8.eeIA32nḄᑖ⚓ᑴ

16r⚓(4K)stᑖ⚓guᜧ⚓(4M)vt9.wsx>?᝞Oyzvx{|ᓫ~⊤/ᙢz`|ḄRvx⌴vvx⌴ᢣᔣvxH|z`Ḅᙢ10.ᙠIA32/-ᐳᨵᵨᡝ᝱ᑮᑁ᪶᝱REFᵨring3ᑮring஺/ring3ᑮring஺Aᐭvm8611.᝞¡9:ᨵvx_¢DB£¤DBsx஺¥winampv᪵¤§vx¨©ª᪵_`Rᵨᑁ,᧜¬ᡈᐰ®¯°(²³>?)ஹy¨©¶·..FndWindow,²³ᑏ᪗»ᑮᦻ^ᡈ½¾⊤,ᐳ¿ᑁ,஺.12.᝞OÀÁÂÃḄÄ7¡ᡠᨵḄᓃ‘>ᡂ'b'?ÂÃÈ°SetWindowsHookEx13.Apartmentᙠ8M/ᨵᵨRÉ⌕ËᐭR14.,-E9RᨵᵨRᨵÌRᡃḄᳮÎvᚮsqlḄÏᔠÑÒÓÔÕÖ×ᩖḄÙ;?@)iEA

17C஺D(〉ᔠ8ᙠSMPGᘤ-"@)ᑣJGᘤKL஺MN1.ᵨOPQᑏSswap(x,y)#defineswap(x,y)\x=x+y;\y=x-y;\x=x-y;2.ᦪUa[N],VWX1YN-1Zᦪᐸ\]Zᦪ^_`a஺ᑏ`ZbᦪcSd^_Ḅᦪe.(_ᩖ!ghi஺(N)bᦪkl2intdo_dup(inta[],intN)3`mnopxqᔲi2ḄstauḄᑨwinti=512;cout<

18XA=_t;returnx;)᠗2q⚜(◤⌕⚜21ஹq+ᵨ6ᦋḄᜧlṹ஺2ஹᵫZᙽUᡂᡠᨵᙽ+ᵨ`U᪗¢Ḅᒹ¤ᦻ¦%ADḄ⌱⚗஺ᙠ©ª«¬®ᡠᨵᒹ¤ᦻ¦⚜i`Z⚜ᜮ஺char*constp;charconst*pconstchar*p-°±Zᨵ²³´char*constp;஻¶ᢣ┐pḄ¹6ºᦋcharconst*p?஻ᢣᔣ¶Ḅᢣ┐ᢣᔣḄ¶¹6ᦋconstchar*p?஻%charconst*pcharstr1[]="abc";charstr2[]="abc";constcharstr3[]="abc";constcharstr4[]="abc";constchar*str5="abc";

19constchar*str6="abc”;char*str7="abc";char*str8="abcH;cout<<(str1==str2)<

20UpperCase(str);cout<

21᝞:&aᦪᢣ┐ᐸint(*)ᢣ┐1⌕᪷"ᢣ┐#$%Ḅ'()Ḅᢣ┐+1*+,Ḅᜧ.()a/05Ḅintᦪᢣ┐ᡠ2⌕5*sizeof(int)ᡠ2ptr▭a[5]3prt4(&a+1)($᪵Ḅ(6789⌕)ᡠ2prt-1:;<=sizeof(int*)a,&aḄᙢᙬ$᪵Ḅ3@A($᪵aᦪ✌ᙢᙬa[0]Ḅᙢᙬ&aCD(ᦪ)✌ᙢᙬa+1ᦪ$ᐗFḄᙢᙬᓽa[1],&a+1$CDḄᙢᙬl|Ja[5].1.HI2JṹᨵMNI⚪Pintmain()(chara;char*str=&a;strcpy(str,"hello");printf(str);return0;)QᨵstrᑖSᑁUVWX;YZ[\I⚪]ᙠX$_`abᑴd$_`efᢣ┐ᡠᢣᙢᙬ஺hᯠj2klm]no3pqdrᑁᙠsᑏuvwxyz஺

22char*s="AAA";printf("%s",s);s[O]='B';printf("%s",s);ᨵMN┯|“AAA”_`a\f஺sᢣ┐ᢣᔣ6_`a\fᡠ2~sḄ᎛ᨵI⚪஺cosntchar*s="AAA";ᯠ+\fᡠ2Cs[0]Ḅ'(ᔠḄ஺1ஹᑏ$“᪗”6mᐭᦪ.Ḅ$஺.#defineMin(X,Y)((X)>(Y)?(Y):(X))஻nQᨵ2ஹᐭ\⌕ᵨᑮ▲¡¢£¤NᵨC¥ᑏ¦¡¢஺while஺){}ᡈὅfor(;;)3ஹᐵ¬_staticḄᵨMN|%☟᝱ef4ஹᐵ¬_constᨵMN°@|⊤²\f(j2³ᦋḄef஺5ஹᐵ¬_volatileᨵMN°@|µ]¶()Ḅ·|¸²¥¹ᘤCDḄ'j»ᙠ¥¹ᘤ¼½¾ᑮḄ¿Àᦋe஺int(*s[10])(int)⊤²ḄMNÁint(*s[10])(int)Âᦪᢣ┐ᦪÃᢣ┐ᢣᔣ$intfunc(intparam)ḄÂᦪ஺1.ᨵ2⊤Å:

23inta=248;b=4;intconstc=21;constint*d=&a;int*conste=&b;intconst*fconst=&a;HIᑡ⊤ÅÇÈ;É¥¹ᘤἭË|MN|*c=32;d=&b;*d=43;e=34;e=&a;f=0x321f;*c6MNÌÌἭË*dÍÎconst,ἭËe=&aÍÎ8nstἭËconst*fconst=&a;ἭË2.ÏᣚefḄ'(ÑᵨÒ¶ef஺ᓽa=3,b=5,Ïᣚ*+a=5,b=3;ᨵÓÔ$ÓᵨÕÖÕ$Óᵨ×Ø[ᡈÙa=a+b;b=a-b;a=a-b;ora=aAb;//:»Cint,char..b=aAb;a=aAb;oraA=bA=a;3.cÚC++ḄstructᨵMN()|cÚC++structḄÛ⌕ÜÝcḄstruct(j2°ᨵᡂᕒÂᦪ,C++Ḅstructj2஺C++structᑭclassḄÛ⌕ÜÝᙠâãäḄUåᩗ▲()structãäpublic,classãäprivate4.#include#include

24voidgetmemory(char*p)p=(char*)malloc(100);strcpy(p,"helloworld");)intmain()(char*str=NULL;getmemory(str);pnntf(n%s/nn,str);free(str);return0;)wxyzgetmemoryḄmalloc(»ç᝱ᑁUfree()Cstr8ᓻ◅5.charszstr[10];strcpy(szstr,"0123456789");êZMNno|MN|/0($᪵;⌼ᡂìḄOS6.ᑡµíÓdwḄ)îïᑴðᐸñò7o·óôfïᑴõö┝øw;ᔠᑖù7.dw*WúóḄ⌶ü

25ᐳþUÿ⌴⍝ᦻẠ11.┝Ḅ!12.┝Ḅ4"#⌕ᩩ&'ஹ)*+ᢝஹ-.ᒑ0ஹ1213.┝Ḅᜐᳮ567ᶍஹ⚜■7ᶍஹ;<7ᶍஹ=>?@◀┝15.BCDEF7ᶍᨵHIJKFCFS(ᐜᩭᐜOP)RSᐜTRUVᱏXYRZT[✄8.]Ḅ☟᝱ᡂᕒb☟᝱ᡂᕒᨵcdeK]Ḅ☟᝱ᡂᕒf"]gᨵh"R☟᝱ᡂᕒf"ijh"9.klmᦪ᝞cpqKrᵨUtuvwxKvirtualvoidf()=0;yz{R|]#}⌕~10.ᦪb⊤ḄdeᦪᦪRpᜧ⊤ᦪ.Rᜧ.᝱ᦋ12.ISOḄywxKtcp/udpyHhKtcp/udpᨵcSKtᵨ⊤

26ᱥᳮ2ᱥᳮtcp/udpTCPOP¡ᦪ¢ஹ.☠ឋஹᨵᦔ¢¦ᑴஹᐰ©ªBCbZ2«ᵨᢈ®஺?TCP-°RUDP±-iIP²³Ḅ.☠ᑴஹ¢¦ᑴ┯µឮ«·¸®஺ᵫUDPº»¼ᓫRUDPᜮᒹÀÁÂḄÃ⁚RºTCPÅÆὑÂ஺tcp:ÈpḄOPRᨵ¢É¦ᑴRyᒹᜮᜧRᑍËឋ-Ìudp:-ÈpḄOPRᒹᜮRÍ├1(void*)ptrb(*(void**))ptrḄÏÐyᔲÒ°KᐸDptr°h"ᢣ┐.(void*)ptrb(*(void**))ptrÖyÒ°Ḅ2intmain()(intx=3;printf("%d",x);return1;)×mᦪØᯠ-ÚᐸÛmᦪEᵨRwx⌕ÜÝ1?mianDRc᪗ßà0⊤ᡂ·R஺⊤┯µ஺ᐹâḄÖyãDᐹâä┯å1,⌕iæiᙢᙬ0x1000000ÖRᡃê.ᵨ

27(unsignedint*)0x100000=1234;ëx⌕yìíîYᑮæiᙢᙬy0x100000ð᡻òRtóôxõK*((void(*)())0x100000)();✌ᐜ⌕÷0x100000øᑴYᣚᡂmᦪᢣ┐Rᓽ(void(*)())0x100000ᯠûüEᵨÛ*((void(*)0)0x100000)();ᵨtypedef.ýþÿtypedefvoid(*)()voidFuncPtr;*((voidFuncPtr)0x100000)();2,ᦪtable,ᵨᦪḄᐗᦪ#defineNTBL#defineNTBL(sizeof(table)/sizeof(table[0]))☢⚪Ḅὶ!"ᔲᐹᨵ&'Ḅᚮ᪘!dll"ᔲᨵ+,Ḅᚮ᪘!"-Ḅ."/0Ḅ1ᔠ34Ḅ5᡻78"ᩭ:ᡂḄ5<=Ḅ>᎛@ABCDEFGHI஺KᨵLMḄᚮ᪘஺DLLNᨵOᨵ+,Ḅᚮ᪘PQ⚪RSTUᡈὅXPQ⚪YZ"ᔲᨵQ⚪஺[\DLLNḄ]ṹ"_`ᡠ᡻7.ᨵbᨵᚮ᪘᝞dDLLNḄ]ṹ"EXENḄᡠeᵨfgP>᎛"R"XPDLLOᨵLM+,Ḅᚮ᪘!᝞dDLLNḄ]ṹ"ᵫDLLLMFGḄᡠ᡻7fg"R"XDLLᨵ+,Ḅᚮ᪘!ijkḄ"ᚮ᪘᝞dlmᚮᩭXKDLLᨵLMḄᚮᡠi᝞d"nDLLN=᝱ᑖq

28ḄᑁsᨬS"nDLLNᑤ◀᝞dEnDLLNᑖqᑁsᯠxᙠEXENᡈὅz᜜DLLNᑤ◀|ᨵ}~5unsignedshortA=10;printf("~A=%u

29",~A);charc=128;printf("c=%d

30",c);!ᑖ᪆⚪,^A=0xfffffff5,int\-11,Ḅ"uint஺ᡠi4294967285⚪c=0x10,Ḅ"int,ᨬ\1,"ᦪᡠiḄC"0x00Ḅ⊡ṹC"128,ᡠi128஺P⍝⚪8"ᙠὃᑴᔣintᡈuintᣚ>Ḅᨬᜐᳮ஺ᑖ᪆☢Ḅ5voidGetMemory(char**p,intnum)(*p=(char*)malloc(num);)intmain()char*str=NULL;

31GetMemory(&str,100);strcpy(str,1,hellon);free(str);if(str!=NULL)(strcpy(str,"worldn);)printf(H

32stris%sn,str);getchar();)Q¡d"¢g!£¤ᜧ¦~XX§[ᐜ©©Hstrisworld«free."ª«ḄstrᢣᔣḄᑁs®YZḄ¯"sᙠḄ.ᡠifree±xᨵSḄ²³C"´str=NULL.µ>strᢣᔣ®Ḅᑁs_Tᦈ᝞d·¸±¹¯sᙠᑖq®Ḅ@AḄºP»s¼®"}~_½:¿ᑖqÀᐸÂÃÄḄÅÆP»5ÇÈ"sᙠᜧᜧḄQ⚪(j☢ᔜÊXË|ÌÍH)"ÎÏÐᡭᓺworldᩭ஺P"[\NḄᑁsÆᳮÓR"ᵫ@AB:ᡂḄÔ"ᵫÕÖᦪLM:ᡂḄ஺×EmallocᙽᑁsḄ>᎛,ÆᳮÕᔣ@ABᵭÚᙽ®(}~ÐÛEᵭÚḄᜧ),

33ᯠxᙠPᙽ®NÜÝÆᳮÞß(Ó"ᙠEᵭÚḄᑁs¹☢à)´}ᵨᑁsḄᙢᙬãT஺"ª«ᑁsḄ>᎛ÆᳮÕÎÏ8Rдᑁs¯À@AB[µE"}iäåæQPᙽᙢᙬḄ.R஺஺஺஺஺஺஺஺çj8XHᨬSPgè஺chara[10],strlen(a)\¢gém15?ê7Ḅ¡d#include"stdio.h"#include"string.h"voidmain()(charaa[10];printf("%d",strlen(aa));)sizeof()ëRëìᓄOᨵᐵïstrlen()ëìᓄᨵᐵ஺char(*str)[20];/*str"ᦪᢣ┐,ᓽᢣᔣᦪḄᢣ┐.*/char*str[20];/*str"ᢣ┐ᦪᐸᐗ\ᢣ┐ôᦪ.*/longa=0x801010;a+5=?

340x801010ᵨᑴ⊤ö\“100000000001000000010000”ᓝᑴḄ\8392720,øùj5C"8392725ú1)À¡᪀structA(chart:4;chark:4;unsignedshorti:8;unsignedlongm;};Qsizeof(A)=?À¡᪀structA(chart:4;4chark:4;4unsignedshorti:8;8unsignedlongm;//þÿ2⁚4⁚)//ᐳ8⁚2)☢Ḅᦪᙠᦪᦪᨵ┯ᦋ஺intadd_n(intn)(staticinti=100;i+=n;returni;)!"#$%ᵨ'()ᑮ+Ḅ,-.⍝!ᑏᦪ1234%ᵨ$5⚪17ᙠstatic±?

35//:;ᑖ᪆#include#include#include#include#include#includetypedefstructAA(intb1:5;intb2:2;}AA;voidmain()(AAaa;charcc[100];strcpy(cc,',0123456789abcdefghijklmnopqrstuvwxyz,');memcpy(&aa,cc,sizeof(AA));cout<ᫀ2-16@1✌ᐜsizeof(AA)ḄᜧD34,b1@b2ᑖEᓰ5bit@2bit.

36GHstrcpy@memcpyI,aaḄ4⁚ᡠLMḄN2O0,1,2,3ḄASCṹ,ᓽ00110000,00110001,00110010,00110011ᡠRᨬITOUVḄ2W4⁚ḄX5Y@ZIḄ2YᑖE3:10000,@01\3int2ᨵ]ZᑖᡠRO>ᫀ2-16@1^ᦪ_`Naᐭx=9999;intfunc(x)(intcountx=0;while(x)(countx++;x=x&(x-1);)returncountx;),-ᕖd⍝4W2ef9999Ḅ#gᑴᦪNiᨵjk1Ḅᦪlᨵ9999=9x1024+512+256+159x1024imᨵ1Ḅᦪ32512imᨵ1Ḅᦪ31256imᨵ1Ḅᦪ3115imᨵ1Ḅᦪ34

37ᦑᐳᨵ1Ḅᦪ38,,-38஺1000-1=0111,o2pᦪqr஺W12pᳮ஺ᵨWtuvᩭ^1Ḅᦪ2xᦔ᳛x{Ḅ஺)|}•ᙢY஺$ᦪᨬk஺inta,b,cᑏᦪC=a+b)Rᦋᦪ᝞cᦋ3longint,ᐵ2᝞ᜐᳮ75⚪booladd(inta,intb,int*c)(*c=a+b;return(a>0&&b>0&&(*ca||*c>b)));)ᑖ᪆Ostructbit{inta:3;intb:2;intc:3;}intmain()(bits;char*c=(char*)&s;cout<

38*c=0x99;cout<

39ஹYḄÑÒ@YªḄÂÃYÑÒÓ,᪀ÑÒÔÕᐸ×Ø3OstructY,᪀ÅÙYᑡ⊤ÛᐸiYᑡ⊤Ḅ×Ø3OÂÃYÅOYÜݨ᝞Ostructbs(inta:8;intb:2;intc:6;)YªḄÂÃÓ,᪀ªÂÃḄuØÔ஺ÞᵨᐜÑÒIÂÃ'ÑÒÂÃᡈὅàáÂÃWâtuØ஺¨᝞Ostructbs(inta:8;intb:2;intc:6;data;ÂÃdata3bsªᐳᓰ«⁚஺ᐸiYaᓰ8YYbᓰ2YYcᓰ6Y஺ãYḄÑÒäᨵR¦åÂÃO1.■■Y|çLᙠ⁚i)èé«⁚஺᝞⁚ᡠᒕ¯°)ëLMìY'íîᓫᐗñLMòY஺óRᨵô±õYî•ᓫᐗ©ö஺¨᝞Ostructbs

40unsigneda:4unsigned:0/*¯*/unsignedb:4/*îᓫᐗ©öLM*/unsignedc:4ᙠWYÑÒiaᓰ"⁚Ḅ4YI4Yø0⊤V)±ᵨbî"#⁚©öᓰᵨ4Ycᓰᵨ4Y஺2.ᵫãY)ᐕÇé«⁚\úYḄÜÝ)èᜧã⁚ḄÜÝó12Â)èûH8Y#gY஺3.YRýYÅW'þ¥ᵨᩭÍøᐙᡈ᦮஺ḄᵨḄ஺᝞:structkinta:1int:2/*2ᵨ*/intb:3intc:2ᑖ᪆ᙠ!"#$%&᪀()*ᐸᡂᕒᢥ/0ᑖ1Ḅ஺/ஹḄᵨḄᵨ3&᪀ᡂᕒḄᵨ45ᐸ$6789:;<•ᐕ>ᵨᔜ%@8A஺

41main(){structbs(unsigneda:1;unsignedb:3;unsignedc:4;}bit,*pbit;bit.a=1;bit.b=7;bit.c=15;priᦋ┯:#includeintmain(void){int**p;intarr[100];p=&arr;return0;)EF:

42G┯Hᢣ┐()5int**p;஻/Lᢣ┐&arr;஻MNIOḄᢣᔣQ$R9100ḄᦪTḄᢣ┐#includeintmain(void){int**p,*q;intarr[100];q=arr;p=&qreturn0;)U☢WXYZ᡻\]^ᨵ`a┯bᡈὅᦔe:#defineMAX255intmain()(unsignedcharA[MAX],i;஻ifgh9unsignedcharfor(i=0;i<=MAX;i++)A[i]=i)EF:ijklᦪTmnop(OU+0\ᦪTmnrs)MAX=255ᦪTAḄU᪗w9Wᐸ$..ᐸ/.yijkᑮ255{,jkᑁ᡻\:

43A[255]=255;W~!ᨵp⚪.,for(i=O;iv=MAX;i++)~{ᵫunsignedcharḄwᙠ(O..255),i++]i90H..▲jkU.structname1{charstr;shortx;intnum;)structname2{charstr;intnum;shortx;)sizeof(structname1)=8,sizeof(structname2)=12ᙠQ/X&᪀9numᢥX⁚char]ᶇ3⁚Ḅ5{9᦮X&᪀Ḅᯠ(W4⁚)ᙠx]⌕⊡2X⁚W᪵#12⁚஺intel:A.c3B.c¡Xcᦻ£ᵨH¡X45Ḅstatic;<¤¥Ḅ{᎛^^ᨵp⚪§¡Xstatic;<^¨ᑮ©(᪘ᚮᡈὅᐸ¬Ḅ)staticḄᐰ¯;<⊤±WX;<²ᙠ!³ᙽᨵµh^¶·ᐸ¬³ᙽ஺

44¬¸¹ºᙠᦪ»¼¤¥ᘤ¬¸Ḅ¾5Ḅ஺᝞e⌕;<ᙠᐸ¬³ᙽ¿ᨵµhḄÀ◤⌕ᵨexternᐵÃ஺structs1(inti:8;intj:4;inta:3;doubleb;)structs2(inti:8;intj:4;doubleb;inta:3;)printf("sizeof(s1)=%d

45",sizeof(sl));printf("sizeof(s2)=%d

46",sizeof(s2));result:16,24Q$Xstructs1inti:8;

47intj:4;inta:3;doubleb;)ᳮÓW᪵Ḅ✌ᐜiᙠ4஺Ḅᓰ8$X⁚ᯠ]j#ᙠ4$X⁚Ḅᵫ$XḄ⁚ᦪ4ḄØᦪÙÚᵨ#ºᙠÛHᯠ]a,⌕ᙠ3ḄØᦪᐵÜḄÙÚ⌕Ý$ᙠ15ḄºUàáâᐳ18,ᢚå*ᩭ2⁚2Ḅ᪵èᵫdouble8⁚ḄÙÚ⌕ᙠ4஺⌕8X⁚ḄºUÙÚ18éêᑮ8X⁚ëḄfìᶍîïºᙠ8⁚ḄHÙÚâᐳ16⁚.Q/Xᨬ]^᯿&᪀óᑁᨬᜧᦪ»ḄØᦪḄÀ^⊡ᡂᨬᜧᦪ»ḄØᦪ5õḄ4⍝☢÷⚪øὺḄúûüýþÿ⍝(ᜧ)1.ᦪḄᜧᨵ!᝱#$Ḅᑁ&'()*()+ᑮ!᝱ᑁ&dongtai,5678()ᦪlongjiaoji(long*a[],longb[],long*alength,longblength,long*dongtai[1)2.ᓫD⊤ḄFG*‘a'-'z'26MNOᐭᑮD⊤Q56᎔S⌕ᡭᓺWXY1Ztypedefstructval{intdate_l;structval*next;)*pgvoidmain(void){charc;for(c=122;c>=97;c-){p.date=c;p=p->next;

48p.next=NULL;))XY2Znode*p=NULL;node*q=NULL;node*head=(node*)malloc(sizeof(node));head->data='';head->next=NULL;node*first=(node*)malloc(sizeof(node));first->data=Ja*;first->next=NULL;head->next=first;p=first;intlength='z'-'b';inti=0;while(i<=longth)(node*temp=(node*)malloc(sizeof(node));temp->data='b'+i;temp->next=NULL;q=temp;head->next=temp;temp->next=p;p=q;i++gprintvheadw;3.y᝿Ḅ⚪|}~ᩭḄᐭM300ᐭQḄᨬḄᓝᩩᡃᐭḄM255byte,ᑁ&ᵨᨵ1G,¡¢ᑏ¤vc¥¦w§¨©¨ªᩖ¬4.®ᑁḄ¯ᔳ᝞baidu,ᨵ²ᓝ³⚪Ꮇµ³⚪¶ᨵ·¸Ḅ¹¯º»¼᪵µ¾¿À¬ᨬÁ¡¢ᑏ¤vc¥¦w§¨©¨ªᩖ¬#includestring,hmain(void){char*src="hello,world”;char*dest=NULL;dest=(char*)malloc(strlen(sre));intlen=strlen(str);char*d=dest;char*s=src[len];

49while(len—!=0)d++=s;printf(z%sz,dest);)Ȥ┯ÊWW#include"string.h஻ftinclude"stdio.h஻ftinclude"malloc.h஻main(void){char*src=஻hello,world”;char*destÌNULL;dest=(char*)malloc(sizeof(char)*(strlen(src)+1));intlen=strlen(src);char*d=dest;char*s=src+len-l;while(len—!=0)*d++=*s—;*d='\0';printf(z%sz,dest);)1.ÎLinuxÏ!ÐḄ³⌕ÑÒÓÔ஺2.ᑡ×ØÙQ©¨ᣚ§¨ᡈὅ§¨ᣚ©¨Ḅݺ஺voidswap(inta,intb)(intc;c=a;a=b;b=a;)--Þ§ßvoidswap(inta,intb)(a=a+b;b=a-b;a=a-b;)6.àáÐâ¤ã¼äåæchar*RetMenory(void)(charp[]=uhellowworld,,;returnp;)voidTest(void)(char*str=NULL;str=RetMemory();

50printf(str);)RetMenory᡻ëìípîïð8ᦈᢣᔣôõᙢᙬ஺78ᙢᙬstrḄᑁøùy⚜ûḄ,ᡭᓺḄùüstrḄᙢᙬᑏýᦪþḄÿintcontinumax(char*outputstr,char*intputstr)ᙠᨬ!Ḅᦪ$%&'(Ḅ!)*+$%&'(ᨬ!ᦪ,-ᐸ/(0ᦪ1ᦪoutputstrᡠᢣᑁ5஺7᝞஻abcdl2345edl25ssi23456789஻Ḅ✌ᙢᙬI-intputstrJ$0ᦪK*+9,outputstrᡠᢣḄLM123456789intcontinumax(char*outputstr,char*inputstr){char*in=inputstr,*out=outputstr,*temp,*final;intcount=0,maxlen=0;while(*in!='\0')(if(*in>47&&*in<58)(for(temp=in;*in>47&&*in<58;in++)count++;)elsein++;if(maxlen

51^ᵨ`0ᦪ,ᵨCbcdeK/᦮gᦪhᓄMjk1:intgetlen(char*s){intn;for(n=0;*s!='\0';s++)n++;returnn;)voidreverse(chars[])(intc,i,j;for(i=0,j=getlen(s)-1;i0);/"deletethenumber*/if(sign<0)s[i++]=’,}s[i]=ஹ()$}reverse(s);)jk2:ttincludeusingnamespacestd;voiditochar(intnum);voiditochar(intnum)(inti=0;intj;charstra[10];

52charstrb[10];while(num){stra[i++]=num%10+48;num=num/10;)strati]='\0';for(j=0;j>num;itochar(num);return0;)ᜩ☢$ᨵ/⚪^$ᦟᜧ!typedefstruct(inta:2;intb:2;intc:1;}test;testt;t.a=1;t.b=3;t.c=1;printf(z$%dz$,t.a);printf(஻d஻$t.b);printft.c);t.aM01,1t.bMIL/1t.cM1,-1

533(ᨵᦪint஺'᡽⚪01111¡ᘤ£¤᡽¥¦ᔠᦪ¥n(ᦪ(1....n)k(ᦪḄ¦ᔠ....᝞combination(5,3)⌕¥:543,542,541,532,531,521,432,431,421,321,#includeintpop(int*);intpush(int);voidcombination(int,int);intstack[3]={0};top=-l;intmain()(intn,m;printf($zInputtwonumbers:

54/z);while((2!=scanf("%d%*c%d஻,&n,&m)))(fflush(stdin);printf("Inputerror!Again:

55z$);)combination(n,m);printf(஻

56஻)})voidcombination(intm,intn)(inttemp=m;push(temp);while(l)(if(l==temp){if(pop(&temp)&&stack[0]==n)஻¬᪘®ᐗ°±&&M²³Ḅᨬ´L$µ¶⌨break;elseif(push(--temp))

57printf(,/%d%d%dstack[O],stack[l],stack[2]);//§ä"1Q@?pop(fttemp);))intpush(inti)(stack[++top]=i;if(top<2)return0;elsereturn1;)intpop(int*i)(*i=stack[top-];if(top>=0)return0;elsereturn1;)1ஹᵨᢣ┐Ḅjk$K“ABCD1234efgh”JÁÂÃÄ#include#include#includeintmain()(charstr[]=,$ABCD1234efgh$/;intlength=strlen(str);char*pl=str;char*p2=str+length-1;while(pl

58$z,str);system("pause");return0;

59)2ஹᨵ/ᑖᦪwᑡ1/2,1/4,1/6,1/8……,ᵨ0ᦪÂᵨḄjk$¥Éᦪᑡ20⚗ḄË#includedoublegetValue()(doubleresult=0;inti=2;while(i<42){result+=1.0/i;஻/Í⌕ÎᵨL0Ï◀ᦪ$^ᵨ1,ᔲᑣÓÔKÕÖhᓄᡂ᦮ᦪ$ᓽ0.000000i+=2;)returnresult;)intmain()(printf(''resultis%f

60஻$getValue());system("pause");return0;)TOD+ØÙfree131(ÚÛÏÜ!)()ÝÞ100200641710:18:33ßᑖ:0ᨵ/(ᦪ¦a[1000]5à0—1000;⌕¥á◞s(ᦪᑤᣵ/(ᦪ$ᑮæç赶éêᜮ죤$¥ᨬJ/(íᑤᣵḄᦪḄîïð᪗ò஺u7(ᦪM7(0,1,2,3,4,5,6,7}0-->1-->2(ᑤ◀)/>3-->4-->5(ᑤ◀)/>6-->7-->0(ᑤ◀),᝞ɵ¶óᑮᨬJ/(ᦪíᑤ◀஺jkLᦪ¦#includeusingnamespacestd;#definenull1000intmain(){intarr[1000];for(inti=0;i<1000;++i)arr[i]=i;intj=0;intcount=0;

61while(count<999)(while(arr[j%1000]=null)j=(++j)%1000;j=(++j)%1000;while(arr[j%l000]=nu11)j=(++j)%1000;j=(++j)%1000;while(arr[j%1000]=null)j=(++j)%1000;arr[j]=null;++count;)while(arr[j]==nul1)j=(++j)%1000;cout«j«endl;return0;}jk2ô⊤#includeusingnamespacestd;#definenull0structnode{intdata;node*next;)}intmain()(node*headsnewnode;head->data=0;head->next=null;node*pshead;for(inti=l;i<1000;i++)(node*tmp=newnode;tmp->data=i;tmp->next=null;head->next=tmp;head=head->next;}head->next=p;while(p!=p->next)

62p->next->next=p->next->next->next;p=p->next->next;)cout«p->data;return0;}jk3öᵨ÷k#include#defineMAXLINE1000஻ᐗ°(ᦪ/*MAXLINEᐗ°(ᦪaüᐗ°ᦪ¦R[]ᢣ┐þsuffixð᪗index*+ᨬJḄF᪗valuesᨬḄ᪗ḄstartK◞*/intfind_n(inta[],intR[],intK,int&index,int&values,ints=0)intsuffix;intfrontnode,current_node;suffix=0;if(s=0){current_node=0;front_node=MAXLINE-l;)else{current_node=s;front_node=s-l;)while(R[front_node]!=front_node){printf(z@%d

63z/,a[current_node]);R[front_node]=R[current_node];if(K==l){currentnode=R[frontnode];continue;)for(inti=0;i

64values=a[front_node];return0;}intmain(void){inta[MAXLINE],R[MAXLINE],suffix,index,values,start,i,K;suffix=index=values=start=O;K=2;for(i=0;i

65஻@index,values);return0;)K⚪Mvoidtest2()(charstring[10],strl[10];inti;for(i=0;i<10;i++)(strl[i]='a';)strcpy(string,strl);)QRMK⚪2,᝞T☢KὅᢣXYZᦪ\strl]^ᙠᦪ\ᑁabcde3ᑖh᝞T☢KὅᢣXstrcpy(string,strl)iᵨklstrlᑁmnoᑴᑮstringᑁmnᡠoᑴḄY⁚ᦪᐹᨵ]vwឋcde7ᑖ,ᙠz{Ạ}ᢣX~ᦪstrcpyḄe10ᑖhstrl]^ᙠᦪ\ᑁabMstrlḄmM{a,a,a,a,a,a,a,a,a,a},ᨵ‘\0'(YZabZ)@ᡠd]^abstrcpy(char*sl,char*s2)Ḅᳮ@s2ᢣᔣḄᑁm,⌲YZᑮsiᡠᢣᔣḄᑁm@ᑮᑮ'\0',strlaᨵ'\0',ᡠdᐹᨵ]vwឋ@]⍝☢஺v᝞voidtest2()(charstring[10],strl[10];inti;for(i=0;i<9;i++)

66strl[i]='a'+i;//¡abcdefghi£eYZᦪ\)str[i]='\0';஻¤}abZstrcpy(string,strl);)¥code⚪¦§strcmpintStrCmp(constchar*strl,constchar*str2)ªª«@ᨵᢌ@®¯°intStrCmp(constchar*strl,constchar*str2)(assert(strl&&srt2);while(*strl&&*str2&&*strl==*str2){strl++,str2++;)if(*strl&&*str2)return(*strl-*str2);elseif(*strl&&*str2=0)return1;elseif(*strl==0&&*str2)return-1;elsereturn0;intStrCmp(constchar*strl,constchar*str2)(஻ḕᶍᑨ´µᢣ┐(·¸¹º)while(*strl&&*strl++==*str2++);return*strl-*str2;)»code⚪¦§¼w½intFindSubStr(constchar*MainStr,constchar*SubStr)ªª«@ᨵᢌ@®¯°intMyStrstr(constchar*MainStr,constchar*SubStr)(constchar*p;constchar*q;constchar*u=MainStr;//assert((MainStr!=NULL)&&(SubStr!=NULL));஻ᵨ´ÁÂᐭÄÅᑨ´while(*MainStr)஻ᑁÆÄÅ⌴È

67p=MainStr;q=SubStr;while(*q&&*p&&*p++==*q++)hif(!*q)(returnMainStr-u+1"/MainStrᢣᔣÊËn½@uᢣᔣ)MainStr++;)return-1;)ᑖ᪆Mintarr[]={6,7,8,9,10);int*ptr=arr;*(ptr++)+=123;printf("%d%d”@*ptr,*(++ptr));ÂXM88ÐÑ:ÓÑptr++)+=123;ᐜª¤Õ6+123,ᯠ++,ᢣ┐ᢣᔣ7hÓprintf("%d%d”@*ptr,*(++ptr));×Ë᡻Å@ᢣ┐ᐜ++,ᢣᔣ8,ᯠÂX8,ÙÚḼÜÂX8Ýᐰᝅà᦮K⚪âã⚪6ஹåæᓫᔣè⊤Ḅᜮ@ëᑏXᑤ◀ᐸðæañḄòÕ@⌕ô@ᐜõᑮzañ@ᯠᑤ◀஺slnodetype*Delete(slnodetype*Head,intkey){}öif(Head->number==key)(Head=Pointer->next;free(Pointer);break;)Back=Pointer;Pointer=Pointer->next;if(Pointer->number==key)

68Back->next=Pointer->next;free(Pointer);break;)voiddelete(Node*p)(if(Head=Node)while(p))ᨵæ16½Ḅ᦮ᦪ@÷4½æᦪ@ᑏᦪôøḄù஺QúM᦮ᦪ1101010110110111ù1101+0101+1011+0111ûüý]þ@Êÿ⚪ᳮḄᡠᑏᦪ⍝஺ᶧᯠ16Ḅ᦮ᦪ11010101101101112ᑴḄ!ᦪ"ᦪ#!$%ᕖ'ᜧ)ᢣᦟ஺,ᫀᵨᓝᑴ0"ᦪ123ᢥ5ᑴὃ⇋஺/*n816Ḅᦪᦪ9:;Ḅ<=ᑖ?@*/charSumOfQuaters(unsignedshortn)charc=0;

69inti=4;do(c+=n&15;n=n>>4;}while(--i);returnc;)ᨵ,1,2.…HᑮnḄJKᦪLM᣸K2OPQ⌕M3STᩖVW0(n),XSTᩖV0(1),YᵨZᣚ\Q•^_`Zᣚaᦪ.(cW)#includeintmain()(inta[]={10,6,9,5,2,8,4,7,1,3);intlen=sizeof(a)/sizeof(int);inttemp;for(inti=0;i

70a[a[i]-1]=a[i];a[i]=temp;if(a[i]==i+1)i++e)for(intj=0;jnext;

71while(q!=NULL)r=q->next;q->next=p;p=q;q=r;)head->next=NULL;head=p;returnhead;)2ᑏhiKᑤ◀k⊤mḄᡠᨵnovoiddel_all(node*head)(node*p;while(head!=NULL)(p=head->next;free(head);head=p;)coutcv"xyXSᡂ{"<

72voidinsert(char*s,char*t,inti)char*q=t;char*p=s;if(q==NULL)return;while(*p!=,\0,)(P++e)while(*q!=0)(*P=*qeP++eq++e)*p='\0'e)ᑖ᪆☢Ḅṹchar*a="hello";char*b="hello”eif(a==b)printf("YES");else

73printf(HNO");ᓫḄ☢⚪ᡃ⌱hnoḄᢣ┐ᙢᙬᔳᙠVCYESᙠCNOlzḄᕖ|}~஺☟᝱¡¢;ᙠiK£¤¥ᑁឤ$¨஺᝞ª«¬ᘤ®ᓄḄ°±ᨵ`a@b²3ᢣᔣ²•helloḄ஺ᑣᙢᙬµ²஺᝞ª«¬ᘤ¶ᨵ®ᓄ!8a²Ḅᙢᙬᑣ²ᑏᦪ·`¸ᡂᑁ?SḄ¹ºmemcpysourcecode:270void*memcpy(void*dst,constvoid*src,unsignedintlen)271{272registerchar*d;273registerchar*s;27275if(len==0)276returndst;277278if(is_overlap(dst,src,len,len))279complain3(஻memcpy஻dst,src,len);280281if(dst>src){282d=(char*)dst+len-1;283s=(char*)src+len-1;284while(len>=4)(285*d-=*s—-286*d--=*s—-287*d=*s;288*d=*s-289len-=4;290}291while(len-){292*d—=*s—;293)294}elseif(dst=4){298*d++=*s++;299*d++=*s++;300*d++=*s++;301*d++=*s++;

74302len-=4;303}304while(len--){305*d++=*s++;306}307}308returndst;309)ÕÖὃ×⚪Ø⌕ὃÙ«ᑏḄṹᔲὃ⇋ᑮᔜ×ÜÝᔲÞᐰ(±àh)ᔜ×ÜÝᒹâ1ஹ"ᦪᢣ┐åæᢣ┐ᔲᨵᦔ2ஹåæTᑴḄè᪗@ḄᙢᔲW²êW²ᑣHnëh3ஹìᑏᩗ▲åæ4ஹÞᐰåæᔲ±àhmemcpy¹ºᙽᑁᑁḄᜧôÙõö;strcpy|}~¹º,⍗ᑮ''0'ùú/*memcpy------¹ºûüḄᑁᙽ*/voidmemcpy(void*pvTo,void*pvFrom,sizetsize)(void*pbTo=(byte*)pvTo;void*pbFrom=(byte*)pvFrom;ASSERT(pvTo!=NULL&&pvFrom!=NULL);//!"ᐭᢣ┐ḄᨵᦔឋASSERT(pbTo>=pbFrom+size||pbFrom>=pbTo+size);஻!./ᢣ┐ᢣᔣḄᑁ23ᔲ56while(size->0)*pbTo++==*pbFrom++;return(pvTo);)>?☢A⚪CDEᑨGH⊤J3ᔲᨵKLboolCirclelnList(Link*pHead)(if(pHead==NULL||pHead->next==NULL)஻T⁚VᡈXᨵY/⁚VZ[T\Kreturn(false);if(pHead->next==pHead)஻\Kreturn(true);Link*pTempl=pHead;//step1Link*pTemp=pHead->next;//step2while(pTemp!=pTempl&&pTemp!=NULL&&pTemp->next!=NULL)pTempl=pTempl->next;pTemp=pTemp->next->next;)

75if(pTemp==pTempl)return(true);return(false);)./_`abs,tcdt_`aeᐭᑮS_`aJbS_`aᨵghḄij2kt_`avoidinsert(char*s,char*t,inti)(memcpy(&s[strlen(t)+i],&s[i],strlen(s)-i);memcpyt,strlen(t));s[strlen(s)+strlen(t)]=b\0';lopᑏY/CrᦪbtrᦪᙠY/_`aJvᑮwxḄᨬzḄ{_`ab[t_`a3ᵫ}Y_`~ᡂḄ஺char*search(char*cpSource,charch){char*cpTempNULL,*cpDest=NULL;intiTemp,iCount=0;while(*cpSource)(if(*cpSource==ch)(iTemp=0;cpTemp=cpSource;while(*cpSource==ch)++iTemp,++cpSource;if(iTemp>iCount)iCount=iTemp,cpDest=cpTemp;if(!*cpSource)break;)++cpSource;)returncpDest;}2஺pᑏY/CrᦪbtrᦪᙠḄᑁ2Ḅ_`bZt_`ᡠᙠ஺intsearch(char*cpSource,intn,charch)(inti;for(i=0;i

76•/ᓫᔣH⊤b⍝ᜮ⁚VbY/ᢣ┐ᢣᔣᐸJḄY/⁚Vb᝞ᑤ◀/ᢣ┐ᢣᔣḄ⁚VL¡/ᢣ┐ᢣᔣḄnext⁚Vcopyᑮ¢⁚Vb¡nextᢣᔣnext-ுnext,Z¤¥ᑤ◀¦nextᢣᔣḄ⁚V஺#includevoidfoo(intm,intn)printf(z/m=%d,n=%d

77஻bm,n);intmain()intb=3;foo(b+=3,++b);printf("b=%d

78஻,b);return0;)"¬Cm=7,n=4,b=7(VC6.0)±²³´pµᘤJ·rᦪ¸ᵨᐵ»¼ᐵᓽᐜ¥ᐭ᪘ÀÁ஺Â}pµᘤ·ᜐᳮ}஺Å3Æ?C᪗ÈJɱ²³ÊË?ÌÍbᡠÎᔜ/pµᘤᔆᖪÒᨵ\Ó·ᳮÔbᡠÎᨬ¥ÕÖ·×ØÙᐰ}஺Æ?᪵bᡠÎ⍗ݱrᦪbᡃß✌ᐜ⌕ὃ⇋ᡃß·pµᘤä᝞ᜐᳮ᪵·rᦪbᐸåærᦪ·¸ᵨ²³b}·¸ᵨ²³bwxÕÖ}·×Ø஺ᨬ¥3æpµᘤçᓄ஺2.ᑏYrᦪbéêᑤ◀_`astrlJëᨵḄ_`astr2.ì/í3ᑭᵨY/KMPᓛóôõvᑮstr2ᯠ¥ᑤ◀(ᵨH⊤éêḄ÷bøᣩúᦪ~)/*ûüýA⚪(_`aþÿ)AB,ABḄᨬᜧᐳ஺᝞A=aocdfezB=஻pmcdfa஻ᑣ“cdf஻*///Author:azhen#include#include#includechar*commanstring(charshortstring7charlongstring[])

79inti,j;char"substring=malloc(256);if(strstr(longstring,shortstring)!=NULL)஻᝞E...FGHIshortstringreturnshortstring;for(i=strlen(shortstring)-1;i>0;iM)஻ᔲᑣ,OPQRST(for(j=0;j<=strlen(shortstring)-i;j++){memcpy(substring,&shortstring[j],i);substring]:1]='\0';if(strstr(longstring,substring)!=NULL)returnsubstring;))returnNULL;)main()(char*strl=malloc(256);char*str2=malloc(256);char*comman=NULL;gets(strl);gets(str2);if(strlen(strl)>strlen(str2))஻[\Ḅ]^☢comman=commanstring(str2,strl);elsecomman=commanstring(strl,str2);printf(''thelongestcommanstringis:%s

80஻comman);11.ᑏMbcᦪefbstrlstr2ḄᜧghijHI0,hstrlᜧkstr2HI1,hstrlgkstr2HIM1intstrcmp(constchar*src,constchar*dst)(intret=0;while(!(ret=*(unsignedchar*)src-*(unsignedchar*)dst)&&*dst)

81++src;++dst;if(ret<0)ret=-1;elseif(ret>0)ret=1;return(ret);}3,o1000!Ḅpqᨵsb0(ᵨuᦪivḄwxᩭz᝞72=2*2*2*3*3);o1->1000|,}~5᦮◀ḄᦪḄbᦪnl,}~25᦮◀ḄᦪḄbᦪn2,}~125᦮◀ḄᦪḄbᦪn3,}~625᦮◀ḄᦪḄbᦪn4.1000!qḄḄbᦪ=nl+n2+n3+n4;#include^defineNUM1000intfind5(intnum){intret=0;while(num%5==0){num/=5;ret++;)returnret;}intmain(){intresult=O;inti;for(i=5;i<=NUM;i+=5)(result+=find5(i);}printf(஻thetotalzeronumberis%d

82஻result);return0;}1.ᨵᔣQR⊤:structnode{intdata;structnode*front,*next;

83);ᨵfbᔣQR⊤A,B,⍝ᐸᜮᢣ┐pHeadA,pHeadB,ᑏ•cᦪ[f⊤dataiḄᑤ◀BOOLDeteleNode(Node*pHeader,DataTypeValue)(if(pHeader==NULL)return;BOOLbKet=FALSE;Node*pNode=pHead;while(pNode!=NULL)(if(pNode->data==Value)(if(pNode->front==NULL)|pHeader=pNode->next;pHeader->front=NULL;)else(if(pNode->next!=NULL)(pNode->next->front=pNode->front;)pNode->front->next=pNode->next;)Node*pNextNode=pNode->next;deletepNode;pNode=pNextNode;bRet=TRUE;஻¦⌕breakᡈreturn,ᑤ◀ᡠᨵ)else(pNode=pNode->next;))returnbRet;}voidDE(Node*pHeadA,Node*pHeadB)

84if(pHeadA==NULL||pHeadB==NULL)(return;Node*pNode=pHeadA;while(pNode!=NULL)(if(DeteleNode(pHeadB,pNode->data))(if(pNode->front==NULL)(pHeadA=pNode->next;pHeadA->front=NULL;)else(pNode->front->next=pNode->next;if(pNode->next!=NULL)(pNode->next->front=pNode->front;))Node*pNextNode=pNode->next;deletepNode;pNode=pNextNode;)else(pNode=pNode->next;)))2.¬®¯°fbᨬᜧᐳ᝞"abccade","dgcadde”ḄᨬᜧcadintGetCommon(char*sl,char*s2,char**rl,char**r2)(intlenl=strlen(sl);intlen2=strlen(s2);intmaxlen=0;for(inti=0;i

85for(intj=0;jmaxlen)(maxlen=count;*rl=si+i;*r2=s2+j;)))}3.¬®¯´ᓝ¶ᑴᦪ(long¸)ᑖº»=¶ᑴᓝ¼¶ᑴ½¾¦}¿ᵨprintfÀᑡÂcᦪchar*test3(longnum){char*buffer=(char*)maHoc(11);buffer[0]='O';buffer[l]='x';buffer[10]='\0';char*temp=buffer+2;for(inti=0;i<8;i++){temp[i]=(char)(num<<4*i>>28);temp[i]=temp[i]>=0?temp[i]:temp[i]+16;temp[i]=temp[i]<10?temp[i]+48:temp[i]+55;)returnbuffer;)ᐭN,ᡭᓺN*NÈ▣᝞N=3,ᡭᓺ123894765

86N=4,ᡭᓺ:12341213145111615610987ËÌ1#defineN15ints[N][N];voidmain()intk=0,i=0,j=0;inta=1;for(;k<(N+D/2;k++)jiwhile(jk-1)s[i][j—]=a++;i—;j++;while(i>k)s[i—][j]=a++;i++;j++;}for(i=0;i

87for(i=x;ix;i—)஻ÞÜmatrix[y+n-l][i]=start++;for(j=y+n-1;j>y;j—)஻ßÜmatrix[j][x]=start++;SetMatrix(x+1,y+1,start,n-2);஻⌴Ö)voidmainO{inti,j;intn;scanf(z%dz/,&n);SetMatrix(0,0,1,n);஻ᡭᓺàáÈ▣for(i=0;i

88஻)â))ᦾäå᜿ᦪᑡ⌴Ö®¯Ḅwx᝞çintFunct(intn)(if(n=0)return1;if(n==l)return1;retrurnFunct(n-l)+Funct(n-2);)è᝞馿ᵨ⌴Öᩭ®¯ÛêcᦪëᦟᔜîïðñËÌintFunct(intn)//nòó᦮ᦪ(inta=0;intb=l;

89intc;if(n-0)c=l;elseif(n=l)c=l;elsefor(inti=2;i<=n;i++)஻ôõnö2OPT÷(c=a+b;a=b;b=c;)returnc;}Ë̯ᙠᜧùᦪÀúûü[ýî]ᙠ^☢þ᪀Ḅᵭᐜ஺100Ḅᑴ001100100ᙠᙠ001——S3100——s2100——siᡠ1᝞ᐜᵭḄᙠᑣ001------si100——s2100------s341ஹ⚪"little-endian,big-endian#ᨵᐵ&2ஹ⚪"Ḅ'()*ᑖ,ᨵᐵ-ᑮ/01⁚ᑖ,301⁚ᑖ,-0DevC++4VC7.156-701⁚89ᑖ,-:;<=ᑖ,-*>)->?@ḄAB᪵Dᶇ)3ஹ⚪"FGᘤᨵᐵ-FGᘤᙠIᵨᚮ᪘)*ḄMNOᑖ,5ᨵᡠ>P-DevC++Iᵨ)*ᑖ,Q01110111b,VC7.1RQ11001100b,ᡠᙠDevC++RḄQ5,ᙠVC7.1RQ1஺SPCTᵨlittle-endian,ᓽ-VᙠWXYZ5-,Tᵨbig-endian,ᓽ-\Q]WXḄ-ᡠ^_ὃ⇋big-endianbc-d᪵Ze^_Q4ᑨgh1ij>kᦻintIsReverseStr(char*aStr)(inti,j;intfound=l;if(aStr==NULL)return-1;

90j=strlen(aStr);for(i=0;i#includeintJosephu(intn,intm)(intflag,i,j=0;int*arr=(int*)malloc(n*sizeof(int));for(i=0;i

91஻-i,j);}free(arr);returnj;)intmain()(intn,m;scanf(஻¿d%d”,&n,&m);printf("ᨬÄᑭḄ%d!

92஻-Josephu(n,m));

93system("pause");return0;)Ç⊤¬#include#includetypedefstructNode(intindex;structNode*next;}JosephuNode;intJosephu(intn,intm)(inti,j;JosephuNode*head,*tail;head=tail=(JosephuNode*)malloc(sizeof(JosephuNode));for(i=1;iindex=i;tail->next=(JosephuNode*)malloc(sizeof(JosephuNode));tail=tail->next;)tail->index=i;tail->next=head;for(i=1;tail!=head;++i)(for(j=1;jnext;)tail->next=head->next;printf("¹%4dhe¼Ḅ%4d

94஻-i,head->index);free(head);head=tail->next;)i=head->index;free(head);returni;)intmain()intn,m;

95scanf("%d%d”,&n,&m);printf("ᨬÄᑭḄ%d!

96",Josephu(n,m));system("pause");return0;)ËstrcpyÌᦪḄÍchar*strcpy(char*strDest,constchar*strSrc);1.>ÏᵨÐÌᦪ-¬strcpyÌᦪ஺2.ÑÒQÓÔ⌕Ökchar*஺Ñ×1.strcpyḄ¬Øṹchar*strcpy(char*strDest,constchar*strSrc)(if((strDest==NULL)||(strSrc==NULL))file://[/I]throwz/Invalidargument(s)”;//[2]char*strDestCopy=strDest;file://[/3]while((*strDest++=*strSrc++)!='\0');file://[/4]returnstrDestCopy;)┯äḄ]å[1](A)>çèᢣ┐Ḅᨵᦔឋ-×í⚪ὅ>SïØṹḄᏉñឋ஺(B)çèᢣ┐Ḅᨵᦔឋóôᵨ((IstrDest)||(!strSrc))ᡈ(ö(strDestfe&strSrc)),×í⚪ὅ÷CøùÍḄ◚cûᣚ#ᨵýþNÿ஺ᙠchar*ᣚboolᓽ◚ᣚᯠᮣ!"Ḅ$%&┯ᭆ᳛*ᜧ,-.ᡂᓣ1஺ᡠ3C++67*89boolஹtrueஹfalse@AᐵCD3EF!GᐰḄᩩJ⊤L஺(C)OPᢣ┐ḄᨵᦔឋVWᵨ((strDest==0)|I(strSrc==0)),`ab⚪ὅef⍝WᵨhiḄjᜐ஺lmWᵨD☢hi(᝞Ḅ0)pqrstḄu-.ឋ஺஺ᯠvᓫstu&xy"ᜐzᢣ┐ḄOP{|&x}~ᘤexᡂḄstᑁ┯~,y᣸◀஺WᵨNULL0,᝞&xᑏ┯~ᘤpOP&ᩭ஺[2](A)returnnewstring("Invalidargument(s)`ab⚪ὅ᪷ef⍝£¤¥Ḅᵨ⌶,§¨©zᑁª«¬®ᨵ¯°±஺²³ᦪ£¤³ᦪµᑁᑖ·Ḅᑁªᓝᑖᓻ◅Ḅ»¼©½¾¿ᑁªḄÀÁÂÃefÄḄÅᵨὅÆᜧ"ᦪÄÇÈÅᵨὅep¾¿ᑁª$%ᑁª«¬஺(B)returnO;,`ab⚪ὅ®ᨵÌÍÎhÏᑴ஺ÅᵨὅᨵuÑÒOP£¤¥ÅᵨὅÓuÔ¼OP£¤¥(ÕÖ☢Ḅ×⊤L)஺ᝠÙÚ£¤¥ÛÜ£¤ÝÞ¥,Îh¥Ḅßàᐸâããäåᜫᦔ஺çè3Â&Îhᩭ£¤¥᪵u3qêÅᵨὅḄÜëஹW┯~epìíᶍஹ*ïstḄu-.ឋ஺[3](A)ÑÒñªòóḄstrDest¥`ab⚪ὅô-eõö஺(A)÷øᑏᡂwhile(*strDest++=*strSrc++);,ù

97(B)÷øᑏᡂwhile(*strSrc!=\0J)*strDest++=*strSrc++;,`ab⚪ὅzýþᩩJḄOPeÿ஺strDestḄᨵᙢ'\0'஺

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

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

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