This week we are going to take the C ++ Level Test. Taking this test 1 aims to learn some C ++ language knowledge, because it is close to what the computer underlying layer uses for us. net and other languages are helpful, which may be helpful for the future development of the underlying layer. 2. If the second-level C ++ is used, the exam will be skipped, based on the above two reasons, most of us have taken the test. After completing the test yesterday, the overall gains are still quite high.
First, let's talk about the data types in some languages. The data types in each language are similar, but they also have their own representation methods, for example, the integer type in VB is integer and the int type in C ++ and C is actually the same. c ++ supports some data structures such as struct keywords, that is, the Custom Data Type in VB. Of course, data is the foundation and is used for calculation. Therefore, operators need to be introduced. Data and operators can form expressions, and expressions can form a more complex structure through three control statements, implement certain functions;
In C ++, the auto-addition, auto-subtraction ++, and--operators are added. Auto-addition and auto-subtraction cannot be considered as new functions, we only use an operator to implement a small function. When we perform operations, the expression looks simple. In addition, pointers are added to C ++: the pointer can be regarded as a variable to save the memory address of the object, which brings us great flexibility and error-prone, the pointer operation is prone to errors such as overflow, underflow, and memory leakage. If the pointer exceeds the address allocated to it, an overflow error occurs, be careful and cautious with pointer operations.
C ++ has an operator overload function, except for (.-> ::? :) These four operators cannot be reloaded. Other operators can be reloaded. In my opinion, other languages do not support Operator overloading, but are relatively low-level, so they are all called implicitly. That is, the function of Operator Overloading is added to the development environment of the language.
It provides a detailed explanation of classes and objects. It describes in detail how constructor and destructor instance the features of objects, constructor and destructor, by default, constructor and self-defined constructor are added with youyuan function and youyuan class. youyuan function does not belong to the class and is written for private data members and functions of the category class.
Inline functions are defined within the class to increase the program running efficiency. They do not compile the code every time an inline function is called. Multiple calls to the same code segment are high program running efficiency.
Another unique feature of C ++ is that it supports polymorphism. Its polymorphism is implemented through the virtual base class, that is, we are in. abstract classes used in. net. abstract classes cannot be used as examples to produce objects. From the perspective of their supported functions, C ++ is also a very powerful language that supports object-oriented programming, it can be used to develop large systems with high efficiency.
After passing this test, I also reviewed some basic knowledge about public languages.
1. Data structures and algorithms
The data structure is a general statement, including the relationship between data and the storage structure of data in the computer. It can be stored in a linear or chained manner. Their advantages and disadvantages are as follows; algorithms are the process of completing one thing or one function. We study the data structure and algorithm, which is nothing more than a process with higher program running efficiency, so that the program runs efficiently and saves space.
Linear structures include linear tables, stacks, and queues. Non-linear structures include Binary Trees and icons.
Select sorting method and Bubble sorting. An improved Bubble sorting method is quick sorting, which is not from the start to the end, instead, each time a large group of numbers is separated from a small group of numbers. After several cycles, you can take a book. For example:
Method: Take a number as the benchmark. First, find a position smaller than the number in the forward comparison.
Then, find from the front of the sequence, the larger swap position than it, and so on.
In short, I reviewed my previous content and learned some new knowledge in this exam. It could be a quiz !!