欢迎来到天天文库
浏览记录
ID:18395158
大小:59.00 KB
页数:6页
时间:2018-09-17
《2004年 上海交通大学 c++语言程序设计期末考试》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、C++Examination:Wednesday1stDecember2004《C++语言程序设计考题》Question1(5marks)a.Whatisthebinaryvalueofthedecimal7?(10进制中的7表示为二进制,结果为多少)b.Whatisthehexadecimalvalueofthedecimal16?(10进制中的16表示为16进制,结果为多少)c.Whatisthebinaryvalue00110101asadecimal?(二进制数00110101对应的十进制是多少)d.Whatisthevalueofthebinarysum00101+0
2、0011?(两个二进制数00101和00011相加的结果是多少)(注意:结果用二进制表示)e.Whatisthevalueofthehexadecimalmultiplication2x10?(十六进制数2和10相乘的结果是多少)(注意:结果用十六进制表示)Question2(5marks)UsingtheASCIItablebelow,whatisthevalueofthehexadecimalsequence“432B2B204578616D21”?根据下面的ASCII码表,写出十六进制序列“432B2B204578616D21”的结果2030040@50P60`70p21
3、!31141A51Q61a71q22"32242B52R62b72r23#33343C53S63c73s24$34444D54T64d74t25%35545E55U65e75u26&36646F56V66f76v27'37747G57W67g77w28(38848H58X68h78x29)39949I59Y69i79y2A*3A:4AJ5AZ6Aj7Az2B+3B;4BK5B[6Bk7B{2C,3C<4CL5C6Cl7C
4、2D-3D=4DM5D]6Dm7D}2E.3E>4EN5E^6En7E~2F/3F?4FO5F_6Fo7FQuestion3(8marks)Whatisth
5、eoutputfromeachofthefollowingfourprograms?下面四个程序对应的输出分别是什么?#includeusingnamespacestd;voidfn();intmain(){inta=7;fn();cout<6、coppercoreisnotexposed.6.4.6enclosurewithinthesametothecablecoreprovidesbindingintoacircle,harnesstiespacingisgenerally100mm;branchofficesshallbebindingonbothends,eachcore5/6#includeusingnamespacestd;voidfn(int);intmain(){fn(8);return0;}voidfn(inta){cout<7、am>usingnamespacestd;voidfn(int*);intmain(){inta=7;fn(&a);cout<usingnamespacestd;inta;voidfn();intmain(){a=7;fn();cout<8、作系统的值是什么?#includeusingnamespacestd;intfn(int);intmain(){intx=fn(7);return0;}intfn(inta){returna++;}beconsistentwithinthesamedisk.Alternateunifiedcorerequirementsplacedontheterminalstripterminals,onlineidentityandensurethecoppercoreisnotex
6、coppercoreisnotexposed.6.4.6enclosurewithinthesametothecablecoreprovidesbindingintoacircle,harnesstiespacingisgenerally100mm;branchofficesshallbebindingonbothends,eachcore5/6#includeusingnamespacestd;voidfn(int);intmain(){fn(8);return0;}voidfn(inta){cout<7、am>usingnamespacestd;voidfn(int*);intmain(){inta=7;fn(&a);cout<usingnamespacestd;inta;voidfn();intmain(){a=7;fn();cout<8、作系统的值是什么?#includeusingnamespacestd;intfn(int);intmain(){intx=fn(7);return0;}intfn(inta){returna++;}beconsistentwithinthesamedisk.Alternateunifiedcorerequirementsplacedontheterminalstripterminals,onlineidentityandensurethecoppercoreisnotex
7、am>usingnamespacestd;voidfn(int*);intmain(){inta=7;fn(&a);cout<usingnamespacestd;inta;voidfn();intmain(){a=7;fn();cout<8、作系统的值是什么?#includeusingnamespacestd;intfn(int);intmain(){intx=fn(7);return0;}intfn(inta){returna++;}beconsistentwithinthesamedisk.Alternateunifiedcorerequirementsplacedontheterminalstripterminals,onlineidentityandensurethecoppercoreisnotex
8、作系统的值是什么?#includeusingnamespacestd;intfn(int);intmain(){intx=fn(7);return0;}intfn(inta){returna++;}beconsistentwithinthesamedisk.Alternateunifiedcorerequirementsplacedontheterminalstripterminals,onlineidentityandensurethecoppercoreisnotex
此文档下载收益归作者所有