Summary of Key Points in C Language for Computer Level 2 (Part 6)

Today, I will share the summary of key points for multiple-choice questions in C language for Computer Level 2 (Part 6).

The content is as follows:

101For program segments that only contain expression statements, the execution order is consistent with the writing order. (In C programs, not every line will be executed, for example, in loop structures, when encountering a break statement, the other statements in that loop will not be executed.)

102Both printf and scanf functions can specify the width of input data..

103The model that represents the relationship between entities using a tree structure is a hierarchical model.

104Bus bandwidth refers to the data transfer rate of the bus.

105To use information from external storage, it must first be loaded into memory.

106C source programs compile files with the suffix .c into files with the suffix .obj as binary files, which are then linked by software called “linker” to generate an executable file with the suffix .exe.

107Each C program consists of multiple C program files, and each C program must have a main() function, so the statement that each C program file must have a main function is incorrect.

108Functions cannot be nested, but functions can call each other, but cannot call the main function, and the position of the main function is not fixed.

1090’ represents the character with ASCII code 48, and ‘
’ represents the character with ASCII code 0.

110Arrays are initialized as a whole when the variable is defined, and cannot be assigned as a whole in an assignment statement.

111After the read and write operations on a file are completed, it must be closed, otherwise it may lead to data loss.

112A sorted list has two basic characteristics: (1) The storage space occupied by all elements is not continuous. (2) The storage space of each data element can be stored in logical order but does not have to be continuous.

113Linked stacks have the advantage over sequentially stored stacks: The push operation will not overflow due to limitations of stack storage space.

114Variables defined outside functions have a scope from the position of variable definition to the end of the source file.

115Variables defined inside functions can only be used within that function’s scope, and function parameters are local variables that can have the same name in different functions.

116The value of an uninitialized global variable is 0. 1001|1110 1111

117The bitwise XOR^” operation rule is that if the corresponding bits of the two operands are the same, the result is 0, otherwise it is 1. XOR with 1 achieves negation, and XOR with 0 keeps the value unchanged. The operator “&” performs a bitwise AND operation on the two operands, resulting in 1 when both corresponding bits are 1, otherwise it is 0.

118| is the OR operator; in bitwise OR operations, if at least one is true, the result is true.

119In C language, any line starting with “#” is called a “preprocessor directive”; preprocessor directives must start with # at the beginning of a line, and cannot end with a period. Depending on the need, directive lines can appear at the beginning of any line in the program, and their effect lasts until the end of the source file.

120Using typedef to define a new type name, the new type name is actually equivalent to the original type name. The original type name remains valid, and the components of a structure type can be arrays and pointers.

All the above content is a personal summary; if there are any errors, please correct me.Thank you for your support, and I wish you success in your exams!Summary of Key Points in C Language for Computer Level 2 (Part 6)Summary of Key Points in C Language for Computer Level 2 (Part 6)Summary of Key Points in C Language for Computer Level 2 (Part 6)

Leave a Comment