Single choice
1. Which thread has the highest priority under Win32? ()
A. thread_priority_highest B. thread_priority_idle
C. thread_priority_time_critical D. thread_priority_above_normal
2. Which of the following four options is not a parameter of the winmain function? ()
A. hinstance B. int
C. lpstr D. wparam
3. What is the underlying implementation of the new operator in the VC ++ compiler?
A. virtualalloc () B. heapalloc ()
C. globalalloc () D. allocateuserphysicalpages ()
Multiple choice
1. Vector: Which of the following operators is reloaded by iterator? ()
A. ++ B.>
C. * (Front) D. =
2. What are the functions of createfile? ()
A. open the file B. Create a new file
C. Rename the file D. delete the file
3. Which of the following are handle )? ()
A. hinstance B. hwnd
C. hdc d. hfont
Question
1. A class must have a constructor without parameters.
2. You cannot write a virtual constructor.
3. All functions in the class are pure virtual functions.
4. the const member function cannot write any data member of this class.
5. Parameters with default values in the function must be placed after parameters without default values.
6. char * P = "test"; P [0] = 'R ';
7. cout <"test ";
8. STL: List does not support Random Access to iterators.
9. The efficiency of STL: vector is higher than that of STL: list.
10. VC and VC ++ are the same thing, while VC ++ is a language that is more difficult than C ++.
Q &
1. # What are the differences between include "filename. H" and # inlcude <FILENAME. h>?
2. Which of the following methods can be used to transmit the values of C ++ functions?
3. Implement a two-way linked list to delete a node P, insert a node after node P, and write these two functions;
4. Is all the actions in C ++ caused by main? If not, give an example.
5. What is the difference between the C ++ class and the struct in C?
6. What are the usage and functions of destructor and virtual functions?
7. What is the difference between global variables and local variables? How is it implemented? How does the operating system and compiler know?
8. Differences between multi-state overload and override.
9. Complete the following steps:Program
*
*.*.
*..*..*..
*... *... *... *...
*.... *.... *.... *.... *....
*..... *..... *..... *..... *..... *.....
*...... *...... *...... *...... *...... *...... *......
*....... *....... *....... *....... *....... *....... *....... *.......
10. explain the difference between stack and stack.
11. in which situations can B be implicitly converted to a for non-C ++ built-in types A and B? [C ++ medium]
12. Which class member functions are generated by default for empty classes in C ++? [C ++ ease]
13. Write a function to copy data between memories. [Whether the problem is comprehensive]
14. Can constructor and destructor be overloaded? Why?
1.Differences between processes and threads
A process is the unit in which the system allocates and schedules resources. The thread isCPUScheduling and dispatching units. A process can have multiple threads which share the resources of the process.
2. Add static function
They are called common member variables and common member functions, and also known as class member variables and class member functions. They are used to reflect the status of the class respectively. For example, a class member variable can be used to count the number of class instances. class member functions are responsible for such statistical actions.
3. mallocAndNewDifference
New Yes C ++ Keyword. Malloc When allocating memory, it must be allocated according to the given bytes, New It can be automatically allocated according to the object size and can call constructor. It can be said that New Is the object, and Malloc No. Essentially New When memory is allocated, additional information is added before and after the actual memory block. New Memory size ratio used Malloc Yes.
4.Stack and stack differences
Stack: automatically assigned and released by the compiler. Variables defined in the function body are usually on the stack.
heap: generally released by programmers. Use New , malloc the memory allocated by the function is on the heap.
Stack is the data structure provided by the machine system, while stack is C/C ++ Provided by the function library. Stack is a function provided by the system. It features fast and efficient. Its disadvantage is that it has restrictions and data is not flexible. Stack is a function provided by the function library, which features flexibility and convenience and wide data adaptability, however, the efficiency is reduced. Stack is the system data structure. / The thread is unique; the heap is the internal data structure of the function library, not necessarily unique. Memory allocated by different heaps cannot be operated on each other. Stack space is divided into static allocation and dynamic allocation. Static allocation is completed by the compiler, such as automatic variables. (Auto) . Dynamic Allocation Alloca Function completed. Stack dynamic allocation does not need to be released ( Yes ) And no function is released. For the sake of portable programs, dynamic stack allocation is not encouraged! Heap space allocation is always dynamic. Although all data spaces are released back to the system at the end of the program, the memory is precisely applied. / Releasing memory matching is the basic element of a good program.
5. Do not call C ++/C For the string library function, please write the Function Strcpy .