Summary of c language knowledge points (the most complete in history)

1. According to the C language, an identifier can only be composed of letters, numbers and underscores, and the first character must be

is a letter or underscore, and the identifier cannot be a keyword of the C language.

2. The general format of the scanf function is:

3.scanf (format control, address list)

4. Logic and "&&", logic or "ll", logic not "!"

The logical AND operator "&&", when the two quantities involved in the operation are both true, the result is true, otherwise it is false; the logical OR operator "ll", when one of the two quantities involved in the operation is true, The result is true, otherwise it is false; the logical NOT operator "!", when the amount involved in the operation is true, the result is false, otherwise it is true.

5. The for loop can be used when the number of loops is uncertain: the for loop judges the expression first, and then executes the loop body language

Sentence; In the for loop, you can use the break statement to jump out of the loop body, so as to continue to execute the statement behind the loop body.

6. The priority of the logical NOT operator "!" is greater than that of the not-equal operator "!=".

7. The general form of the do-while statement is: do loop body statement while (expression); where the loop body statement can be

It is a compound statement, but it must be enclosed in curly braces. There must be a semicolon after the while as the end of the statement. In the do-while loop, the while cannot be omitted.

8. It is impossible to call the function to change the value of the actual parameter pointer variable, but the value of the variable pointed to by the actual parameter pointer variable can be changed.

9. The effective member in the union variable is the member stored last time, and the original member after storing a new member

member becomes useless.

10. According to the C language, an identifier can only consist of letters, numbers and underscores, and the first character must be

is a letter or underscore, and the identifier cannot be a keyword of the C language.

11. Read string function The function of the fgets function is to read a string from the specified file into the character array, the function

The calling form is fgets(character array name, n, file pointer): where n is a positive integer. The meaning of fgets(str,n,fp); is to read n-1 characters from the file pointed to by fp and send them to the character array str.

12. A programming language is a language used to write computer programs, and its basic components include the following four types, data components:

Used to describe the data in the program. Operational components: describe the operations required in the program. Control component: The logical control structure used to construct the program. Transmission components: define data transmission components, such as input and output languages.

13. Software engineering includes three elements, namely methods, tools and processes. Methods are the technical means to complete a software engineering project;

Tools support software development, management, and document generation: process supports the control and management of all aspects of software development.

14. The main work of database logic design is to convert the E─R diagram into the relational schema in the specified RDBMS. First of all, the conversion from E-R diagram to relational schema is relatively straightforward. Entities and relationships can be expressed as relations, and attributes in E-R diagrams can also be converted into relational attributes. Entity sets can also be converted into relationships.

15. The so-called full binary tree refers to such a binary tree ; except for the last layer, all nodes on each layer have two

a leaf node. That is to say, in the full binary tree , the number of nodes on the layer reaches the maximum value, that is, there are 2k-1 nodes on the kth layer of the full binary tree , and the full binary tree with a depth of m has 2m-1 nodes .

16. Some popular programming languages ​​allow recursive calling of procedures. A recursive call is a procedure call itself. implemented recursively

Yes: When the process is executed every time, it can return to the process that called it last time. In this way, a last-in-first-out relationship is formed between the call points, and the stack structure is just suitable for storing these call points.

17. Software engineering encourages the development and adoption of various advanced software development methods, tools and environments. Use of tools and environments

It further improves the software development efficiency, maintenance efficiency and software quality.

18. The smallest unit of data processing is a data item; a data element is composed of several data items; and data refers to the data that can be calculated

The information carrier for computer identification, storage and processing; data structure refers to the relationship between data and data operation.

19. Database system data has high sharing and low redundancy, but data redundancy cannot be completely avoided; data consistency

Consistency means that different occurrences of the same data in the system should maintain the same value.

20. Switch statement, its general form is;

21. switch (expression)

22.    {

23. case constant expression l: statement l;

24. case constant expression 2: statement 2:

25    ...

26. case constant expression n:statement n;

27. default: statement n+1;

28.    }

Its semantics are to evaluate the expression. And compare it with the value of the following constant expression one by one. When the value of the expression is equal to the value of a certain constant expression, the subsequent statement will be executed, and then no judgment will be made, and the statements after all subsequent cases will continue to be executed. If the value of the expression is different from the constant expressions after all cases, execute the statement after default.

29.The memory length occupied by the structure variable is the sum of the memory length occupied by each member. Each member occupies its own

storage unit, and the memory length occupied by the union variable is equal to the length of the longest member.

30. In a one-dimensional array, it should be noted that the value of the constant expression of the subscript expression must be greater than or equal to zero, and less than the number of its own elements, that is, the length of the array.

31. If a character array is used as a string, then when defining the character array, the size of the array should be

This should be one element more than the longest character it will actually hold, to hold 'l0'.

32. "ll" means or, "l" means bitwise or, "&&" means and, there is no such thing in C language

There is "or"".

33. The function of function fopen: open a file calling method FILE*fp;fp=fopen(file name, use file

Way);

The function of the function fprintf: transfer the formatted output to a file Call method: fprintf (file pointer, format string, output list);

The function of the function fclose: close a file Call method: fclose (file pointer);

The function of the function fscanf: perform formatted input from the disk file. Call method: fscanf(file pointer, format string, input list).

34. The C language stipulates that the conditions that need to be met for calling another function (that is, the called function) in a function are;

①The first function to be called must be an existing function (a library function or a user-defined function). ②If library functions are used, generally the #include command should be used at the beginning of this file to "include" the information needed when the function calls the library functions into this file.

③ If you use a custom function, and the function is in the same file as the function calling it, you should generally declare the called function in the calling function, that is, declare to the compilation system that the function will be called, and The information informs the compilation system.

35. There are several ways to define variables of structure type as follows:

36. ① While defining the structure type, define the variable of the structure type, as in the following definition when defining the structure

The variable td1 of type aa is defined at the same time. After replacing the macro name AA with the macro body struct aa in the above option B, it is the same as the definition form, so it is correct. In this definition form, the structure type name aa can be omitted,

37.     struct aa

38.    {…

39.     }tdl;

40.② Define the structure type first, and then define the variable of the structure type, the form is as follows: 41. struct aa

42.{

43.

;

struct aa tdl;

This form of definition can also evolve into, first use the type definition statement typedef to define the structure type as a type name AA, and then directly use the type name AA to define a variable (there is no need to use the keyword struct at this time) .

44.The function of the function strcpy is to copy the character string, the usage is char*strcpy(char*str1l,char*str2), the function is to copy the character

The string ⒉ is copied to the string Ⅰ. A two-dimensional array can be regarded as a special one-dimensional array whose elements are another one-dimensional array.

45.Although the C language makes function calls by value, it is also possible to pass the value of a pointer (the address of a variable) to

To achieve the purpose of modifying the value of the actual parameter variable, this is the main problem explained in this question. Second, it should be noted that the expression *(z++) evaluates to *z.

46. ​​"!" represents the logical NOT operator, "! =" is equal to the operator, and the logical NOT operator has priority over the equal operator

Low.

47.①The default output format of the floating-point number of the printf function: in the output of the printf function, if there is no output width limit, each

All kinds of data have a default output width. Generally, the decimal places of floating point numbers are 6 digits, no matter the output format is %f or %lf.

48. The floating-point number width of the printf function limits the output: the decimal part is output according to the specified number, and the data is rounded up

deal with.

49.3Integer width-limited output of printf: Integer original number output without width system.

50. Regarding the C language, we should understand the following basic knowledge that must be mastered:

① A C program is made up of functions.

② A function consists of two parts: the header of the function and the body of the function.

③A C program is always executed from the main function, regardless of the position of the main function in the entire program (the main function can be placed at the beginning of the program, or at the end of the program, or written before some functions, and in another after some functions).

④ C programs are written in a relatively free form. Several statements can be written in one line, and one statement can be divided into several lines. Every statement and data definition must end with a semicolon.

⑤The C program itself has no input and output statements. The operation of input and output is done by functions such as library functions scanf and printf. ⑥ You can use /define...*/ to comment on any part of the program in C language.

51. Compared with other high-level languages, C language relaxes the syntax check, so the program design has a large degree of freedom, which is not unreasonable.

Check the syntax, the program in C language is composed of functions. Functions cannot be defined nestedly, but they can be called nestedly.

52. Entities are things that exist objectively and can be distinguished from each other. Entities can be concrete objects, such as a student, or

So an abstract event, such as a trip, etc. Therefore, entities can be both living things and inanimate things, but they must exist objectively and be distinguishable from each other.

53. In the file system, the simplest form of recording the internal structure independently of each other is a collection of records of equal length and format.

It is easy to cause a lot of waste of storage space and is inconvenient to use. In a database system, data is structured, and this structure requires not only describing the data itself, but also describing the relationship between the data when describing the data, which is achieved by using a specific data model.

54.Usually, the software product life cycle is called the process of software product from proposing, realizing usage maintenance to cessation of usage and decommissioning.

It can be divided into three stages: software definition, software development and software operation and maintenance.

55.Before the idea of ​​structured programming was proposed, the efficiency of the program was emphasized in the program design.

People pay more attention to the understandability of the program than to the efficiency.

56. Compared with the formatted model (network model and hierarchical model), the relational model has the following advantages, that is, the data structure is better than

It is relatively simple, has high data independence, can directly handle many-to-many connections, and has a solid theoretical foundation.

57.Distributed database systems have the characteristics of data distribution, logical integrity, location transparency, and replication transparency.

Its data is also distributed; however, data in a distributed database system is often stored repeatedly, and the data does not have to be stored repeatedly, mainly depending on the distribution mode of the data. If the allocation mode is one-to-many, that is, one segment is allocated to multiple sites for storage, it is a redundant database, otherwise it is a non-redundant database.

58.The head node not only identifies the position of the head node in the table, but also according to the structure of the singly linked list (including the head node), as long as

After mastering the table header, you can access the entire linked list , so the purpose of adding the header node is to facilitate the realization of the operation.

59.Algorithm analysis refers to the quantitative analysis of the running time and occupied space of an algorithm , and generally calculates the corresponding number

Level, often expressed in time complexity and space complexity. The purpose of analyzing the algorithm is to reduce the time complexity and space complexity of the algorithm and improve the execution efficiency of the algorithm .

60. A tree is a finite collection of one or more nodes, one of which is called the root, and the rest of the nodes are divided into several

Make a disjoint set. Each collection is also a tree. A tree has one and only one root node.

61.Software Requirement Specification (SRS, Software Requirement Specification) is the most important part of the requirements analysis stage.

The final result is one of the important documents in software development. It has the following functions: ①It is convenient for users and developers to understand and communicate; ②It reflects the structure of user problems, which can be used as the basis and basis for software development work; ③As the basis for confirmation testing and acceptance.

62. The external mode is the user's data view, that is, the data mode that the user sees

The description of the global data view is called the conceptual schema, which is the description of the overall logical structure of all data in the database; the description of the physical storage data view is called the internal schema, which is the description of the database in terms of physical storage;

The storage mode is internal mode.

63. Structured Query Language (Structured Query Language, referred to as SQL) is a set of data definition, data manipulation

A database language that integrates data control functions.

64.The goal of software engineering is to develop effective, reliable and reliable software under the premise of given cost and schedule.

Products that are understandable, maintainable, reusable, adaptable, portable, traceable, and interoperable and meet user needs. Based on this goal, the theoretical and technical research contents of software engineering mainly include: software development technology and software engineering management.

65.The process of operating or testing a system by manual or automatic means for the purpose of verifying that it complies with specifications

needs or identify discrepancies between expected and actual outcomes. Software testing is the process of executing a program in order to find bugs. Testing should be centered on finding bugs, not demonstrating correct functionality of the software.

66.Internal Schema (Internal Schema), also known as Physical Schema, gives the database physical storage

Storage structure and physical access methods, such as data storage file structure, index, cluster and hash access methods and access paths.

67.Database Management System (DBMS for short) is the organization of the database, it

It is a kind of system software, which is responsible for data organization, data manipulation, data maintenance, control and protection, and data services in the data. The database management system is the core of the database system.

68.In C language, semicolons can be used to separate each statement, and multiple statements can be written in one line;

In the C language, the data types for calculation must be consistent. Therefore, it is not allowed to store integer numbers in real variables. Storing integer data is actually converting integers into real types for storage.

Since the real variables are stored with limited storage units, the effective digits that can be provided are always limited, and the numbers beyond the effective digits will be rounded off, which may cause some errors.

69. "%" is a remainder operator or modulo operator, and both sides of "%" should be integer data

70. In the C language, the self-increment operator is recorded as "++", and its function is to increase the value of the variable by 1. decrement by 1 operator

Recorded as "--", its function is to make the variable value decrement by 1. The auto-increment and auto-decrement operators are unary operations, and both have right associativity. Can have the following forms:

 ++li increases by 1 before participating in other operations--Ii decreases by 1 before participating in other operations i++i After participating in the operation, the value of i increases by 1i--After i participates in the operation, the value of i decreases again 1

Error-prone in understanding and use are i++ and ++i. Especially when they appear in more complex expressions or statements, they are often difficult to figure out, so they should be parsed carefully.

71. Both sides of the operator "%" should be integers. In addition, x%=k is equivalent to x=x%k.

72. Use strcpy (function, the calling method of this function is:

73.strcpy (character array, string) where "string" can be a string constant or a character

array. The function of the function is to completely copy the "string" into the "character array", and the original content in the character array will be overwritten. Note when using this function:

① The character array must be defined large enough to accommodate the copied string. When copying, it is copied together with the end flag '10'.

② You cannot use the assignment operator "=" to directly assign a string to a character array, and you can only use the strcpyO function to process it.

In addition, this question also examines the strcat () function of connecting strings, and its calling method is: strcat (character array, string)

The function is to connect the "string" to the end of the string in the "character and array", and store it in the "character array". The original end marker in "char array" is overwritten by the first character of "string", which was not modified in the operation. Note when using this function:

①Because there is no boundary check, programmers should pay attention to ensure that the "character array" is defined large enough to accommodate the target string after connection; otherwise, problems will arise due to insufficient length.

②The two strings before the connection will have the end mark '\0', after the connection, the end mark '\0' of the string stored in the "character array" will be discarded, and only one 'io' will be reserved at the end of the target string.

74. The input method of the scanf function. The Scanf() function is a format input function, which reads from the standard input device (keyboard)

Read the entered information. The calling format is: scanf("<format string>", <address table>);, the format string includes the following three types of different characters:

② Format specifier: The format specifier is basically the same as the format specifier in the printf () function

②Blank characters: Blank characters will cause the scanf() function to omit one or more blank characters in the input during the read operation. ③Non-blank character: A non-blank character will cause the scanf () function to remove the same character as the non-blank character when reading. The address table is the addresses of all the variables that need to be read in, not the variables themselves. This is completely different from the printf) function, so special attention should be paid. The address of each variable is separated with ",", and it should also be noted that when inputting, the input form should correspond to the format string.

75.Operations such as definition of pointer array, initial value assignment, reference and assignment of array elements, and general array processing methods are basically

same. Its format is: storage type data type*pointer array name 1[length 1]{initial value 1}, ... The function is to define a pointer array pointing to the "data type" variable or array, and assign initial values ​​to the elements of the pointer array. These pointer variables have a specified "storage type".

76.A class is an essential programming language structure in an object-oriented language, used to implement an abstract data type. inheritance between classes

Inheritance relationship realizes shared attributes and operations between classes. A class can be defined on the basis of another defined class, so that the type inherits the attributes and methods of its superclass. Of course, you can also define your own attributes and method.

77.In the tree structure, each node has only one antecedent, which is called the parent node, and there is only one node without an antecedent, which is called the parent node.

The root node of the tree; each node can have multiple consequences, which are called the child nodes of the node. A node without a consequence is called a leaf node.

78.In the object-oriented model, the most basic concepts are objects and classes. Objects are models of entities in the real world; attribute

All objects with the same set and method set can be combined to form a class.

79.If objects with similar attributes and operations are classified into classes, that is to say, a class is an object with common attributes and common methods

collection. Therefore, a class is an abstraction of an object, and an object is an instance of its corresponding class.

80. Data independence is the interdependence between data and programs, that is, the data in the database is independent of the application and not dependent on

in the application. That is to say, changes in the logical structure, storage structure, and access method of data will not affect the application program. Data independence is generally divided into two levels of physical independence and logical independence.

81.In the relational model, the data is regarded as a two-dimensional table, and each two-dimensional table is called a relationship. for each column in the table

It is called an attribute, which is equivalent to a data item in the record, and the naming of the attribute is called the attribute name; a row in the table is called a tuple, which is equivalent to the record value.

82. The goal of software testing is to execute the program in a carefully controlled environment to find bugs in the program, given that the program can

Identification of reliability: Debugging is also called troubleshooting, which is a concept related to and different from testing. Specifically, the purpose of testing is to expose errors and evaluate the reliability of the program, while the purpose of debugging is to find the error location and correct the error.

83.Programming language is used to write computer program language, and its basic components have the following four types, data components: used to

Describes the data in the program. Operational components: describe the operations required in the program. Control component: The logical control structure used to construct the program. Transmission components: define data transmission components, such as input and output languages.

84.Software Requirements Specification (SRS, Software Requirement Specification) is the requirement analysis phase

The final result is one of the important documents in software development. It has the following functions:

①It is convenient for users and developers to understand and communicate;

Reflecting the structure of user problems, it can be used as the basis and basis for software development work; ③ as the basis for confirmation testing and acceptance.

85.The main work of database logic design is to convert the ER diagram into the relational schema in the specified RDBMS. First, from

The transformation from ER diagram to relational mode is relatively straightforward. Entities and relationships can be expressed as relations, and attributes in ER diagrams can also be converted into relational attributes. Entity sets can also be converted into relationships.

86. The escape characters of C language are shown in the table below.

The meaning of escape characters ﹑ escape characters in

carriage return line feed

\t Skip horizontally to the next tab position

 \v vertical tab

\b backspace

\rEnter

\f form feed

ll backslash character "," single quote character

\a ring the bell

. ddd

Characters represented by 1~3 octal numbers

The character represented by xhh1~2 hexadecimal numbers

87.In order to facilitate the representation of various data types, the machine uses BCD code (decimal number), ASCII code (character

type), Chinese characters machine internal code and so on various codes. The data is expressed in complementary code, original code and inverse code. Real data representation methods include floating-point method and fixed-point method, etc. Candidates need to master the meaning of various codes and use them to calculate and compare. What needs to be pointed out is that inside the machine, all codes are encoded in binary, and they are all stored in the machine in binary. The ASCII values ​​of the characters "5" and "7" are 53 and 55 respectively, and their binary forms are 00110101 and l 00110111 respectively.

88.The complexity of the algorithm mainly includes the time complexity of the algorithm and the space complexity of the algorithm .

The so-called time complexity of an algorithm refers to the computational workload required to execute the algorithm ; the space complexity of an algorithm generally refers to the memory space required to execute the algorithm .

89. The chained storage structure overcomes the shortcomings of the sequential storage structure: its node space can be dynamically applied and released: its

The logical order of the data elements is indicated by the pointers of the nodes, and there is no need to move the data elements. Therefore, the linear table under the chain storage structure is convenient for insertion and deletion operations.

90. The concept of data structure generally includes three aspects, the logical structure of data, storage structure and operations on data

gather. The logical structure of data only abstractly reflects the logical relationship between data elements, regardless of its storage representation in the computer.

91. The main principles of the structured programming method can be summarized as top-down, step-by-step refinement, modularization and restricted use

The goto statement, in general, can make the program structure well, easy to read, easy to understand, and easy to maintain.

92.Software design includes software structure design, data design, interface design and process design. where structural design is the definition of

The relationship between the main components of the software system; data design is to transform the model created during analysis into the definition of data structure; interface design is to describe how to communicate within the software, between the software and the operating system, and between the software and people; process design It is a procedural description of converting system structural components into software.

93.The task of validation testing is to verify the functionality and performance of the software, and whether other characteristics meet the requirements specified in the specification.

A requirement; the main purpose of integration testing is to find errors related to interfaces.

94.The data flow diagram includes 4 aspects, namely processing (transformation) (input data is processed and transformed to generate output) data flow (along

The channel for transmitting data in the direction of the arrow, usually marked with the data stream name), storage file (data source) (represents the file storing various data during processing), source and pool (represents the interface between the system and the environment, and belongs to the outside of the system entity).

95.The data in the database has the characteristics of "integration" and "sharing", that is, the database concentrates the data of various applications,

Construct and store them uniformly so they can be used by different applications.

96. The ER model is the entity-relationship model, which transforms the requirements of the real world into several basic

concepts, and the two connection relationships between them. The phase of database design includes the following processes: conversion from ER diagram to relational schema, standardization and adjustment of logical schema, implementation of standardization and RDBMS, and relational view design.

97. The manual management stage appeared before the mid-1950s, and the data is not independent and completely dependent on the program;

The file system is the initial stage of the development of the database system, and the data independence is poor; the database system has a high degree of physical independence and certain logical independence.

98.The basic unit that constitutes a C program is a function. A C program is always executed from the main function, regardless of the main

Where the function is located in the overall program. The function definitions of the C language are all parallel and independent to each other. When defining a function, another function cannot be defined within one function. There are two general formats for C function definitions: traditional and modern. The traditional format, also known as K&R format, is the format used by early compilation systems; the modern format, also known as ANSI format, is the format used by modern compilation systems.

99.The structured programming method is to use only three basic program control structures to compile the program, so that the program has

Has good structure. The three basic structures are sequence structure, selection structure and loop structure.

100.40000 has exceeded the range of the short integer specified by the C language. To assign such a number to a long variable

Quantity, you need to add the letter L after the integer constant.

101. Among all the operators in C language, the comma operator has the lowest priority. In C language, size is distinguished, so APH

and aph are two different variables. The assignment expression ab means that the value of b is paid to a, while the value of b itself remains unchanged; any type of data allowed can be entered into the computer through the keyboard. In option D), when inputting data from the keyboard, integer values ​​and characters can be input for integer variables, and real numbers and integer values ​​can be input for real variables.

102. sizeof () length operator, or byte number operator. This function is used on data types and variables. Note: sizeof

Operators cannot be used on function types, incomplete types or bit fields. An incomplete type refers to a data type with an unknown storage size, such as an array type with an unknown storage size, a structure with an unknown content, or a union type void type, etc.

103. When the self-increment operator is used as a suffix expression, the value of the expression remains unchanged, only the value of the variable is increased by 1, so the expression

The formula (x++*1/3) is equivalent to (11*1/3) which is 3 after rounding.

104. The strlcn function calculates the length of the string. The characters contained in this string are: '\t' (tab), '

"" "double quotes), '\065' (ASCI value is 065 in octal, that is, the character with decimal 51), '\ xff' (ASCII value is hexadecimal ff, that is, the character with decimal 255), ' \n' (line break).

105. When assigning a value to an array, you can use a string as the initial value. This method is intuitive, convenient and in line with people's expectations

Habit. The length of the array array is not 5, but 6, which must be noted. Because the system adds a '\0' at the end of the string constant, the above initialization is the same as char array []=('C' ,' h' ,' i' ,'n' ,' a' , 10' };equivalence.

106. There are two types of logical structure of data: linear structure and nonlinear structure.

107. There are four commonly used storage representation methods, sequential storage, chain storage, index storage, and hash storage. Among them, Shun

The sequential storage method is to store logically adjacent nodes in storage units that are also physically adjacent.

108. Advantages of inheritance: similar objects can share program code and data structures, thus greatly reducing redundancy in programs

In addition, improve the reusability of software.

109. Based on the goal of software engineering, the theoretical and technical research contents of software engineering mainly include: software development technology and software engineering management. Software development technology includes: software development methodology, development process, development tools and software engineering environment, the main content of which is software development methodology. Software engineering management includes: software management, software engineering economics, and software psychology.

110. In relational operations, all operation objects and operation results are relations. A relation is defined as a set of tuples with the same arity

gather. Therefore, relational operations are characterized as set operations.

111. Some of the more popular programming languages ​​allow recursive calls to procedures. A recursive call is a procedure call itself. implemented recursively

Yes: When the process is executed every time, it can return to the process that called it last time. In this way, a last-in-first-out relationship is formed between the call points, and the stack structure is just suitable for storing these call points.

112. The goal of software engineering is to develop effective, reliable and reliable software under the premise of given cost and schedule.

Products that are understandable, maintainable, reusable, adaptable, portable, traceable, and interoperable and meet user needs. Based on this goal, the theoretical and technical research contents of software engineering mainly include: software development technology and software engineering management.

113. Internal Schema (Internal Schema), also known as Physical Schema, gives the database physical storage

Storage structure and physical access method, such as data storage file structure, index, cluster, hash and other access methods and access paths.

114. The data in the database system has high sharing and low redundancy, but data redundancy cannot be completely avoided; data consistency

It means that different occurrences of the same data in the system should maintain the same value.

115. The Database Management System (DBMS for short) is the organization of the database.

It is a system software responsible for data organization, data manipulation, data maintenance, control and protection, and data services in the database. The database management system is the core of the database system.

116. In the C language, there are two forms of real numbers, namely the decimal number form and the exponential form. In the exponential form, e3,

2.1c3.5, .e3, e, etc. are illegal exponent forms. For another example, 123c3 or 123E3 both represent 123 multiplied by 10 to the third power. Note that there must be a number before the letter c, and an integer must follow the c.

117. In C language, different format characters are used for different types of data, among which, "%d" is for integer data

Actual length output. In "%md", m is the width of the specified output field. If the number of digits of the data is less than m, the left end will be filled with spaces. If it is greater than m, the output will be based on the actual number of digits.

118. The expression in the for statement can be partially or completely omitted, and the two ":" cannot be omitted.

119. The user does not need to redefine before calling the standard library function, but only needs to use the precompile command to include the file where the function is located

to the user source file. Moreover, the system allows the user to redefine the standard library function independently, but at this time the function will lose its original meaning. Therefore, the correct answer is option B). When calling a function, you must pay attention to the following syntax: ①The function name must be exactly the same as the called function name; ②The number of actual parameters is the same as the number of formal parameters;

③ The function must be defined first and then called. If the return value of the called function is int or char, the definition of the called function can also be placed after the calling position.

If the function is not declared before the function call, the compilation system will use the function form encountered for the first time as the function declaration, and the function type will be int type by default.

120. The general form of the definition of a parameterized function is:

type identifier, function name (formal parameter list) {declaration part

language

Formal parameters are separated by commas ".".

121. EOF is the end-of-file mark of the text file, and NULL is the return value when the file is opened incorrectly. Foef (fp)

It is used to determine whether the file position pointer is at the end of the file. Both text files and binary files can use this function. Returns 1 if end-of-file is encountered, 0 otherwise.

122. In the C language, putting a character constant into a character variable does not actually put the character itself inside

Instead of going to the storage unit, the corresponding ASCII code of the character is placed in the storage unit.

123. In the tree structure, each node has only one antecedent, which is called the parent node, and there is only one node without an antecedent.

It is called the root node of the tree; each node can have multiple consequences, and they are all called the child nodes of the node. A node without a consequence is called a leaf node.

124. Structured analysis methods mainly include: data flow-oriented structured analysis method (SA-Structured analysis),

Data structure-oriented Jackson method (JSD-Jackson system development method) and data structure-oriented structured data system development method (DSSD-Data structured system devclopment mcthod).

125. In the object-oriented model, the most basic concepts are objects and classes. Objects are models of entities in the real world: the

All objects with the same set of attributes and methods can be combined to form a class.

126. Modularization refers to the process of dividing a software system into several modules from top to bottom when solving a complex problem.

This decomposition reduces complexity.

127. Data is the abstraction of symbols in the real world, while the data model (data model) is the abstraction of data features. It starts from

The abstract level describes the static characteristics, dynamic behavior and constraint behavior of the system, and provides an abstract framework for the representation and operation of database system information.

128. The data model is divided into three types according to different application levels. They are conceptual data models (conceptual data

model), logical data model (logic data model), physical data model (physical data model).

129. Data structure is a subject that studies data elements and their interrelationships and data operations. It includes three aspects

The content of the surface, that is, the logical structure of the data, the storage structure and the operation of the data.

130. The length of a string refers to the number of characters in the string, and the number of characters can be zero.

131.Computer algorithm refers to a complete and complete description of the problem-solving method. It has the following basic characteristics: feasibility, certainty

Qualitative, finite and possessing sufficient intelligence.

132. Objects have the following basic characteristics, namely uniqueness of identification, classification, polymorphism, encapsulation and module independence.

133. The emergence of the concept of software engineering comes from the software crisis. The so-called software crisis generally refers to the development and maintenance of computer software.

A series of serious problems encountered in the process. In short, the software crisis can be attributed to issues such as cost, quality, and productivity.

134. Software design follows the basic goals and principles of software engineering, and establishes the basic principles that should be followed in software design.

The principles and concepts related to software design are abstraction, modularity, information hiding, and data independence. Bottom-up is a type of incremental testing in integration testing.

135. The salient features of software are large scale and super-linear growth in complexity. When developing large-scale software, high quality must be ensured.

Extremely complex and difficult, not only involves technical issues, but more importantly must have strict and scientific management.

136. Database system (Database System, referred to as DBS) including database (Databasesc, referred to as DB) and database management

System (Database Management System, referred to as DBMS).

137. The relational model allows the definition of 3 types of data constraints, which are entity integrity constraints, referential integrity constraints, and user-defined

Defined integrity constraints. Among them, the first two integrity constraints are supported by the relational database system. For user-defined integrity constraints, the relational database system provides an integrity constraint language. The user uses this language to provide constraints, and the system automatically checks them at runtime.

138. The conditional operator requires three operands, called the ternary (element> operator, which is the only ternary operator in the C language.

eye operator. The general form of a conditional expression is: expression 1? expression 2: expression 3

The order of solving is: first solve expression 1, if it is not 0 (true), then solve expression 2, and the value of expression 2 is used as the value of the whole conditional expression. If the value of expression 1 is О (false), then expression 3 is solved, and the value of expression 3 is the value of the entire conditional expression. And pay attention to the usage of ++ and --.

In the 139.8 base system, it is impossible to include numbers above 8, and its range is only between 0-7, starting with 0. Likewise, ten

The hexadecimal system starts with Ox, and the numbers are between 0-9 and a~f.

140. "%ed %d %d" means to input data in the form of an integer number. When inputting data, one or more spaces are used to separate two data, and the Enter key or Tab key can also be used.

141.k=n++ means to assign the value of n to k first, and then add 1 to the value of n

142. Functions in C language can be called recursively, but functions cannot be defined in functions, and functions do not need to return

Value, if there is a return value, the return value type must be determined.

143. The probability of inserting an element at any position in the linear table is equal, that is, the probability is p=1/(n+1), then inserting an element

The average number of moving elements required for prime time is E=1/ (n+1)n+1n=1 (n-i+1 ) =n/2.

144. The data model that uses a tree structure to represent the entity type and the relationship between entities is called a hierarchical model, and is represented by a directed graph structure

The data model of the entity type and the connection between entities is called the network model, and the data model of the two-dimensional table structure representing the entity and the connection is called the relational model.

145. There are two types of typical data flow: transformation type and transaction type.

Transformation type means that information enters the system along the input path, and at the same time transforms from the external form to the internal form. The information entering the system passes through the transformation center, and after being processed, it is transformed into an external form along the output path and leaves the software system; in many software applications, There is some kind of job data flow, which can cause one or more processing, these processing can complete the function required by the job, this kind of data flow is called transaction.

146. Data independence is the interdependence between data and programs, that is, the data in the database is independent of the application and not dependent on

in the application. That is to say, changes in the logical structure, storage structure, and access method of data will not affect the application program. Data independence is generally divided into two levels of physical independence and logical independence.

147. The prototype of the strcmp function is char*strcmp(charRs1,char*s2>; the function is for the strings pointed to by s1 and s2

For comparison, if s1<s2 returns a negative number, s1—=s2 returns 0, and if s1>s2 returns a positive number.

148. The storage form of the logical structure of data in the computer storage space is called the storage structure of data.

149. Common process design tools are: program flow chart, NS diagram, PAD diagram and HIPO diagram. Among them, in order to avoid flow

Because of the flexibility of program diagrams in describing program logic, a block diagram is proposed to replace the traditional program flow chart, which is usually called NS diagram.

150. The object-oriented world is promoted by mutual cooperation between objects, and this mutual cooperation between objects

The operation needs a mechanism to assist, such a mechanism is called a message. A message is the information passed between one instance and another instance, it requests the object to perform a certain process or to answer a certain requested information, it unifies the data flow and the control flow.

151. Common demand analysis methods are: structured analysis method and object-oriented analysis method. Commonly used in structured analysis

Tools include: Data Flow Diagram (DFD), Data Dictionary (DD), Decision Tree and Decision Table, etc.

152. In a relational database, a two-dimensional table is used to represent the relationship between entities.

153. The relationship is composed of several different tuples, so the relationship can be regarded as a collection of tuples, and the ER diagram is converted to the relationship

In relation mode, both entities and relationships can be represented as relationships.

154. The program in c language starts to run from the main function main(), and the main function calls other functions.

155. The left side of an assignment expression cannot be a constant or an expression. Such as: the expression a+7=c+b is illegal

156. The backslash character "\" is assigned to the character and should be written as ch=w'

157. In the operation process of the linked list , use the link method, that is, the structure of the circular linked list to unify the operations of the empty list and the non-empty list

Come. A circular linked list has two characteristics:

①Add a head node in the circular linked list , its data field is arbitrary or set according to needs, and the pointer field points to the node of the first element of the linear list. The head pointer of the circular linked list points to the head node.

②The pointer of the last node in the circular linked list is not empty, but points to the header node.

158. Based on the goal of software engineering, the theoretical and technical research contents of software engineering mainly include: software development technology

and software engineering management.

Software development technology includes: software development methodology, development process, development tools and software engineering environment, the main content of which is software development methodology.

Software engineering management includes: software management, software engineering economics, software psychology, etc.

159. Corresponding to the structured demand analysis method is the structured design method.

Structural design is the technique of using the best possible method to design the various components of the system and the internal connections between the various components. In other words, structural design is the process of deciding which methods to connect which parts to solve a specific and clearly defined problem.

160. The relational model allows the definition of three types of data constraints, which are entity integrity, referential integrity, and user-defined

Integrity constraints of , where the first two integrity constraints are automatically supported by relational database systems.

Entity integrity constraints require that the attribute value in the primary key of the relationship cannot be empty, which is the most basic requirement for database integrity, because the primary key is the only one that determines the tuple, and if it is empty, its uniqueness becomes impossible.

Referential integrity constraints are the basic constraints associated between relations, which do not allow relations to refer to tuples that do not exist: that is, the foreign key in the relation is either a tuple that actually exists in the associated relation, or a null value.

Custom integrity is a constraint specifically set by the user for the specific data environment and application environment, and it reflects the semantic requirements of the data in the specific application.

161. The data model is divided into three types according to different application levels, which are conceptual data model, logical data model and physical data model.

data model. The conceptual data model, referred to as the conceptual model, is a model that faces the objective world and users; it has nothing to do with the specific database management system.

162. Both stacks and queues are special linear tables with limited operations, which only allow insertion and deletion at endpoints. two

The difference between the two is: the stack only allows insertion or deletion at one end of the table, which is a "last in, first out" linear table; while the queue only allows insertion at one end of the table, and deletion at the other end, is A "first in, first out" linear table.

163. The linked list uses a chained storage structure, which overcomes the shortcomings of the sequential storage structure: its node space can be dynamically

Application and release; the logical order of its data elements is indicated by the node pointer, and there is no need to move the data elements. But the chain storage structure also has disadvantages:

①The pointer field in each node requires additional storage space; ②The chained storage structure is a non-random storage structure

164. The purpose of testing is to find errors in software. Experience has shown that the probability of a bug in a program being found in that program is as

is proportional to the number of errors. This phenomenon shows that in order to improve the test efficiency, testers should focus on dealing with those error-clustered programs.

165. The software life cycle is divided into three stages: software definition, software development and software operation and maintenance. In this topic, the detailed design,

Both software coding and software testing belong to the software development stage: maintenance is the last stage of the software life cycle, and it is also the stage that lasts the longest and costs the most. One purpose of software engineering is to improve the maintainability of software and reduce maintenance. the price.

166. Database (Database, referred to as DB) is a collection of data, which has a unified structure and is stored in a unified

Various application data are integrated in the storage medium, and can be shared by various application programs. The data in the database has the characteristics of "integration" and "sharing".

167. Data processing means the process of converting data into information;

The physical independence of data means that the change of the physical structure of the data will not affect the logical structure of the database;

The rows in the relationship are called tuples, which correspond to the records in the storage file, and the columns in the relationship are called attributes, which correspond to the fields in the storage file.

168. Computer language is divided into low-level language, assembly language and high-level language. C language is a high-level language, but it does not mean

C language is more advanced than other languages: except for low-level languages, all other languages ​​must be compiled into binary numbers that can be recognized by computers before they can be executed; C language appeared between 1972 and 1973, and it is not the latest language.

169. The formal parameters and actual parameters of a function have the following characteristics:

① The memory unit is only allocated when the formal parameter variable is called, and the allocated memory unit is released immediately when the call ends. Therefore, formal parameters are only valid inside the function. After the function call ends and returns to the calling function, the formal parameter variable can no longer be used.

②Actual parameters can be constants, variables, expressions, functions, etc. No matter what type of quantity the actual parameters are, they must have definite values ​​when the function is called, so that these values ​​can be transferred to the formal parameters. Therefore, methods such as assignment and input should be used in advance to obtain a definite value for the actual parameter

③Actual parameters and formal parameters should be strictly consistent in quantity, type, and order, otherwise a "type mismatch" error will occur.

④ The data transfer that occurs in the function call is one-way. That is, only the value of the actual parameter can be transferred to the formal parameter, but the value of the formal parameter can not be reversely transferred to the actual parameter. Therefore, during the function call, the value of the formal parameter changes, but the value in the actual parameter does not change.

170. The calling form of the Fseek function is: fseek (file pointer, displacement, starting point)

The "starting point" is replaced by 0, 1 or 2, 0 represents "the beginning of the file", 1 is the "current position", and 2 is the "end of the file". "Displacement amount" refers to the number of bytes moved forward based on the "start point". ANSIC and most versions of C require displacements to be long data. In this way, there will be no problems when the length of the file is greater than 64k. The ANSI C standard stipulates that adding a letter L at the end of the number indicates the long type.

171.EOF is the end mark pointing to the text file, NULL is the return value when opening the file error. Feof (fp> with

To determine whether the file is at the end of the file, both text files and binary files can use this function, if the file ends, it returns 1, otherwise it returns 0.

172. Algorithm refers to a complete and complete description of a problem-solving method. It has four basic characteristics, namely feasibility, certainty,

Infinity and having enough intelligence.

173. For an ordered linear table of length n, in the worst case, binary search only needs to compare log2n times, and the order

A lookup requires n comparisons.

174. Classify objects with similar attributes and operations into classes, that is, a class is a collection of objects with common attributes and methods.

175. The database management system is a layer of system management software located between the user and the operating system. It is a system software.

It is a standard interface between the user and the database. It is always based on a certain data model, which can be divided into hierarchical model, network model and relational model.

176. In a function, pointer variables can be used to refer to the corresponding array elements in the calling function. This operation is passed

The first address of the array is implemented.

177. The external mode is the user's data view, that is, the data mode that the user sees;

The description of the global data view is called the conceptual schema, which is the description of the overall logical structure of all data in the database; the description of the physical storage data view is called the internal schema, which is the description of the database in terms of physical storage;

The storage mode is the internal mode.

178. In the C program, when judging the logical value, use not О to represent true, and use О to represent false. When a logical expression is evaluated, the logical

If the value of the expression is true, it is represented by 1, and if the value of the logical expression is false, it is represented by О.

179. The grammatical format of the switch statement is:

switch(expression)

case constant expression 1: statement group 1; case constant expression 2: statement group 2;...

case constant expression n: statement group ntdefault: statement group n+1;

}

In addition, pay attention to the following key points about the switch statement: ① The system calculates the value of the switch expression during execution;

② Search for a match in each case label expression according to the obtained value until the label matching the expression is found (in this case, the match is case ' B':);

③ After finding the match, execute the following corresponding statement list, and execute it in sequence;

④ If there is no matching label, if there is a default label, execute the statement list n+l behind the statement label; if there is no default label, do not execute any statement list in switch.

Generally speaking, there will always be "unexpected" situations in the multi-branch structure. At this time, they can be classified into the default: program segment for unified processing. Default label is optional, not every time, as needed. Switch statements can also contain switch statements to form switch nesting.

180. The way to refer to members in structure variables is: structure variable name. member name, pointer variable name -> member name, (*

Pointer variable name). Member name.

181. The macro definition with parameters is as follows: #define macro name (parameter) string.

Macro definitions are not C statements, so there is no need to add a semicolon at the end of the line.

182. The function of the strlen function is to find the length of the string and return the number of characters, excluding the last '\0'

The function of the strcpy function is to copy the following string to the space pointed to by the previous string.

183.Buf is a pointer. For fread, it is the storage address of the read data. For fwrite, it is to output

data address

184. The logical structure of data has two categories: linear structure and nonlinear structure. 

185. There are four commonly used storage representation methods, sequential storage, chain storage, index storage, and hash storage. Among them, Shun

The sequential storage method is to store logically adjacent nodes in storage units that are also physically adjacent.

186. Advantages of inheritance: similar objects can share program code and data structures, thus greatly reducing redundancy in programs

In addition, improve the reusability of software.

187. In relational operations, all operation objects and operation results are relations. A relation is defined as a set of tuples with the same arity

gather. Therefore, relational operations are characterized as set operations.

188. The general calling form of the fwrite function is: fwrite buffer, size, count, fp), where:

buffer: It is a pointer variable, which is the starting address of the data to be output

size: the number of bytes to write

count: how many size bytes of data items to write fp: file pointer

189. Data Definition Language (DDL) is responsible for data schema definition and data object

Management access construction: Data Manipulation Language (Data Manipulation Language, DML for short) is responsible for data manipulation, including query, addition, deletion, modification and other operations.

190. Data processing refers to the process of converting data into information, so option A is wrong; the physical independence of data

It refers to the change of the physical structure of the data, which will not affect the logical structure of the database, so the description of option B is wrong; the rows in the relationship are called tuples, which correspond to the records in the storage file, and the columns in the relationship are called attributes, which correspond to the storage file fields in the .

191. The main principles of the structured programming method can be summarized as top-down, progressive refinement, modularization and restricted use

The goto statement generally makes programs well-structured, readable, understandable, and maintainable.

192. The labor management stage appeared before the mid-1950s, and the data is not independent and completely dependent on the program: Document

The software system is the initial stage of the development of the database system, and the data independence is poor; the database system has a high degree of physical independence and certain logical independence.

193. In the C language, commonly used data types include int.char, float, double, etc., but the C language standard does not specify the following

The number of memory bytes occupied by various types of data above only requires that the data length of long type is not shorter than that of int type, and that of short type is not longer than that of int type. How to realize it is determined by each computer system.

194. In the C language, it is impossible to call a function to change the value of the actual parameter pointer variable, but it is possible to change the value of the actual parameter pointer variable

the value of the variable.

195. Since the priority level of the %= operator is lower than the - operation, a%=4-1 is a%=3, which is equivalent to a=a%3 or a=2%3=2.

The expression a+=a*=a-=a*=3, pay attention to the value of the assignment expression and the value of the variable is updated at any time when calculating, calculate the value of the expression, a=2 at the beginning, the expression assignment is from left to On the right, the expression a*=3 makes a=6, and the value of this expression is also 6, so the expression a-=a*=3 is equivalent to a-=6, at this time a=a-6=6 -6=0, the value of a is 0, and the subsequent calculations do not need to be done, and finally a=O.

196. The C language stipulates that if the pointer variable q already points to an element in the array, then q++ points to the next element in the same array

an element (instead of simply incrementing the value of q by 1).

197. A linear list can be an empty list; the first element has no direct predecessor, and the last element has no direct successor; a linear list

In the definition, the arrangement of elements does not specify the order of size.

198. The emergence of the concept of software engineering comes from the software crisis. In order to eliminate the software crisis, solve the software crisis through serious research

Computer method, realized that software engineering is the way to make computer software to engineering science, and gradually formed the concept of software engineering.

199. The data flow is equivalent to a pipeline, and one level of data (information) flows through it. In the data flow diagram, use the label with the name

The arrows indicate data flow. Data flow can flow from processing to processing, from processing to file or from file to processing, and can flow from external entity to system or from system to external entity.

200. In a relational table, each row is called a tuple, which corresponds to a record in the table; each column is called an attribute in the table,

Corresponding to a field in the table; in a two-dimensional table, the minimum attribute set that can uniquely identify a tuple is called the key or code of the table. 201. The circular linked list is to point the pointer of the last node in the one-way linked list to the head node, so that the whole linked list forms a ring

Shape, such a structure makes it possible to access the entire linked list from any node in the list .

202. In a directed graph, if any two vertices are connected, the graph is called a strongly connected graph. The shape of such a directed graph is

Circular, so it should have at least n sides.

203. An important metric for the evaluation of independent programs of modules. Measuring the module independence of software using coupling

and cohesion are two qualitative metrics.

204. The white box testing method of software is to regard the test object as an open box, which allows the tester to use the

The logical structure and relevant information of the department, design or select test cases, and test all the logical paths of the program.

205. The C language regards the file as a sequence of characters (bytes), that is, the data sequence of one character (byte)

sequence composition. According to the organizational form of the data, it can be divided into ASCII files and binary files. An ASCI file is also called a text file, and each byte of it contains an ASCI code, representing a character. The binary file is to output the data in the memory to the disk as it is stored in the memory.

206. Usually, referring to an array element can use the subscript method, such as the form of alp-a], or the pointer method, such as the form of (&alil).

In this question, a[9]=9, a[10] obviously exceeds the range of the array. Note that the subscript of the array starts from О.

207. The function of function rewind is to repoint the file pointer to the beginning of a stream. Usage is as follows: int rewind(FILEstream): and no return value.

208. In the tree structure, each node has only one antecedent, which is called the parent node, and there is only one node without an antecedent, which is called the parent node.

The root node of the tree: each node can have multiple consequences, and they are all called the child nodes of the node. A node without a consequence is called a leaf node.

209. Algorithm analysis refers to the quantitative analysis of the running time and occupied space of an algorithm , and generally calculates the corresponding number

Level, often expressed in time complexity and space complexity. The purpose of analyzing the algorithm is to reduce the time complexity and space complexity of the algorithm and improve the execution efficiency of the algorithm .

210. The head node not only identifies the position of the head node in the table, but also according to the structure of the singly linked list (including the head node), as long as

After mastering the table header, you can access the entire linked list , so the purpose of adding the header node is to facilitate the realization of the operation.

211. Compared with the formatted model (network model and hierarchical model), the relational model has the following advantages, that is, the data structure is better than

It is relatively simple, has high data independence, can directly handle many-to-many connections, and has a solid theoretical foundation.

212. In the file system, the simplest form of recording its internal structure independently of each other is a collection of records of equal length and format.

It is easy to cause a lot of waste of storage space and is inconvenient to use. In a database system, data is structured, and this structure requires not only describing the data itself, but also describing the relationship between the data when describing the data, which is achieved by using a specific data model.

213. In the DOS environment, the device file name that can represent both the keyboard and the display is CO

Guess you like

Origin blog.csdn.net/m0_65334415/article/details/123942687