Hello, little lambs! Starting today, I will bring you an analysis of the GESP exam questions. Currently, I plan to focus on C++. I hope that through this sharing, you can suddenly understand a common mistake, which is useful!Here, I will not provide answers to programming questions, but I will highlight points to pay attention to or ideas. If you have questions, feel free to comment. If you are in a hurry, you can also add my personal WeChat (ldw_0711) to inquire.To begin with, I hope you can complete the exam according to the time requirements before checking the analysis!How to obtain the exam questions:
File shared via cloud: 2023 GESP C++ Level 1 March Exam Questions (without answers).pdf
Link: https://pan.baidu.com/s/1K3YkyLKXQDWZnG74dYoq0A?pwd=ldw0 Extraction code: ldw0
1. Multiple Choice Questions
1. To understand simply:
An input device is the means by which we convey information to the computer.
An output device is the means by which we receive information from the computer.
The answer is B
2. The basic unit in a computer is a byte (Byte): B
The answer is A
3. 7.0 is a floating-point number, and the default type is double.
The answer is A
4.Definition and use of variables:
First declare the variable type.
You must initialize the variable before using it!!!
Pay attention to the naming rules of variables (identifiers).
The answer is C
5. Naming rules for variable names (identifiers):
1. Cannot start with a number.
2. Cannot use C++ keywords (words that have already been defined with functionality).
3. Cannot use symbols other than underscores.
4. Variable names are case-sensitive.
The answer is B
6.!cin and cout are not C++ keywords!
The answer is D
7. The increment operation is for the current variable.
The answer is D
8. The formula for calculating the perimeter of a rectangle and its transformation.
The answer is A
9.Perform operations according to operator precedence, noting that characters will automatically convert to ASCII, and the calculation result will automatically convert to the type with the highest precision (which is double here).
The answer is A
10.a*=3 is equivalent to a=a*3.
The answer is D
11. The question means: who cannot be correctly judged.
Correct judgment means that both a and b are 0, and the corresponding result of the condition is true;
Otherwise, it is false.
The answer is B
12. For this type of question, use the special value method to quickly get the result by choosing a special value to test.
The answer is C
13. Write down the changes in each variable’s value according to the code logic.
The answer is D
14. 1248, multiply by 2 each time.
The answer is B
15. Analyze the code; here we find all multiples of 3 or 5 and sum them up.
The answer is C
2. True or False Questions
1. Basic operations of the keyboard.
The answer is √
2. The CPU is used for calculations.
The answer is ×
3. Comments are ignored and do not affect.
The answer is ×
4. Naming rules.
The answer is √
5. One-eye characters.
The answer is ×
6. 0 and 1 can also represent true and false.
The answer is ×
7. If the loop variable never meets the loop condition, it will not be executed.
The answer is ×
8. The second half of the sentence is incorrect.
The answer is ×
9. Correct.
The answer is √
10. The calculation result always leans towards the higher precision through automatic conversion.
The answer is √
3. Programming Questions
1. Number of days in a month.
(1) Determine leap year.
(y%4==0 && y%100!=0) || y%400==0
2. Area of a rectangle.
(1) Eliminate duplicates.
As long as the length is greater than or equal to the width, the loop can end when it reaches a square.
Finally, if you are interested or are also learning programming, feel free to add Lazy King’s personal WeChat (ldw_0711). I hope to provide some help on your programming journey!