Chapter 1: Fill-in-the-Blank Questions on Basic C Language Knowledge

1. A C program must contain at least one ( ), which is ( ).

2. A function consists of two parts, which are ( ) and ( ).3. The scope of the function body is ( ).4. The function body generally includes ( ) and ( ).5. The C language performs input and output through ( ).6. In C language, if an identifier is immediately followed by a pair of parentheses, it indicates that it is a ( ).7. The pair of parentheses after the main function name can be empty, but the pair of parentheses cannot ( ).

Reference Answers:

1. A C program must contain at least one (main function), which is (main function).

Explanation: All C programs start execution from `main()`, and without the main function, they cannot run.

2. A function consists of two parts: the declaration part (function name, return type, parameter list) and the function body (the block of code that executes the logic).

Explanation: Example: `int add(int a, int b) { return a + b; }`

3. The scope of the function body is (inside the curly braces `{ }`).

Explanation: The function body starts with `{` and ends with `}`, containing variable definitions and statements.

4. The function body generally includes (variable declarations/definitions) and (executable statements).

Explanation: Variable declaration: e.g., `int x;`, executable statement: e.g., `x = 10;`

5. The C language performs input and output through (standard library functions).

Explanation: Common functions: Input: `scanf()`, Output: `printf()`

6. In C language, if an identifier is immediately followed by parentheses, it indicates that it is a (function name).

Explanation: Example: `printf()`, `main()`

7. The parentheses after the main function name can be empty, but the parentheses cannot (be omitted).

Explanation: e.g., `main()`).

Leave a Comment