下载后可任意编辑C++ Examination: Wednesday 1st December 2024《C++语言程序设计考题》Question 1 (5 marks)a.What is the binary value of the decimal 7? (10 进制中的 7 表示为二进制,结果为多少)b. What is the hexadecimal value of the decimal 16?(10 进制中的 16 表示为 16 进制,结果为多少)c.What is the binary value 00110101 as a decimal?(二进制数 00110101 对应的十进制是多少)d. What is the value of the binary sum 00101 + 00011?(两个二进制数 00101 和 00011 相加的结果是多少)(注意:结果用二进制表示)e.What is the value of the hexadecimal multiplication 2 x 10?(十六进制数 2 和 10 相乘的结果是多少)(注意:结果用十六进制表示)Question 2 (5 marks)Using the ASCII table below, what is the value of the hexadecimal sequence “43 2B 2B 20 45 78 61 6D 21” ?根据下面的 ASCII 码表,写出十六进制序列“43 2B 2B 20 45 78 61 6D 21”的结果2030040@50P60`70p21!31141A51Q61a71q22"32242B52R62b72r23#33343C53S63c73s24$34444D54T64d74t25%35545E55U65e75u26&36646F56V66f76v27'37747G57W67g77w28(38848H58X68h78x29)39949I59Y69i79y2A*3A:4AJ5AZ6Aj7Az2B+3B;4BK5B[6Bk7B{2C,3C<4CL5C\6Cl7C|2D-3D=4DM5D]6Dm7D}2E.3E>4EN5E^6En7E~2/3?4O5_6o7下载后可任意编辑FFFFFFQuestion 3 (8 marks)What is the output from each of the following four programs?下面四个程序对应的输出分别是什么?#include using namespace std;void fn();int main(){int a = 7;fn();cout << a;return 0;}void fn(){static int b = 8;b++;}#include using namespace std;void fn(int);int main(){fn(8);return 0;}void fn(int a){cout << a + 1 << endl;}#include using namespace std;void fn(int*);int main(){int a = 7;fn(&a);cout << a << endl;return 0;}void fn(int *b){(*b)++;}下载后可任意编辑#include using namespace std;int a;void fn();int main(){a = 7;fn();cout << a < endl;return 0;}void fn(){a++;}Question 4 (2 marks)What value does the following pro...