1、希赛网(),专注软考、PMP、通信考试更多考试真题及答案与解析,关注希赛网在线题库(http:/ x=y; y=tmp;intmaim_(2)_希赛网(),专注软考、PMP、通信考试更多考试真题及答案与解析,关注希赛网在线题库(http:/ b=7;printf(“a1=%d b1=%dn“,a,b);Swap(a,b);Printf(“a2=%d b2=%dn”,a,b);return0;【代码2】#include#define SPACE “ /空格字符Intmain_(3)_ charstr128=“Nothingisimpossible!“;inti,num=0,wordMark=0;
2、for(i=0;stri;i+)If(stri=SPACE)WordMark=0;else If(wordMark=0)wordMark=1;num+;Printf(“%d/n”,num)return0;【代码3】#include#define SPACE“ /空格字符intcountStrs(char*);intmain_(4)_ charstr128=“Nothing is impossible!“;Printf(“%d/n“,(1)(str)return0;intcountStrs(char*p) intnum=0,wordMark=0;for(;(2);p+) If((3)=SPACE
3、)wordMark=0;elseif(!wordMark)wordMark=1;+num希赛网(),专注软考、PMP、通信考试更多考试真题及答案与解析,关注希赛网在线题库(http:/ classChatRoom .public:staticvoidshowMessage(User*user,stringmessage)coutgetName_(8)_sendMessage(“Hi!Leo!“);li_sendMessage(“Hi!John!“);voidjoin(User*user) (3)(“HeIIoEveryone!lam“+user-getName_(10)_);.;intmain_(11)_ChatRoomSystem*crs=(4);crs-startup_(12)_;crs-join((5)(“Wayne“);deletecrs;/*程序运行结果:John:Hi!Leo!Leo:Hi!John!希赛网(),专注软考、PMP、通信考试更多考试真题及答案与解析,关注希赛网在线题库(http:/