Tencent Company-C + + pen Test
This part of the Tencent C + + interview with the pen test is mainly C/s + +,
DataStructure
SimpleAlgorithm
Operating Systemand other aspects of the basic knowledge, convenient to Tencent interview development colleagues have reference!
The written questions seem to have sizeof, trees and other multiple-choice questions.
Filling in the blanks is a complete procedure.
The supplementary question has the writing algorithm,
Programming, database SQL statement query.
There is also an open problem with C + +.
Tencent/C + + pen questions are as follows:
1, please define a macro, compare the size of the two number A, B, you can not use greater than, less than, if statement
#define MAX (A,B) (A/b)? a:b
2. How to output the header of the source file and the number of rows currently executing
int line = __line__;
char *file = __file__;
cout<< "file name is" << (file) << ", Line is" <
3, two numbers multiplied, the number of digits after the decimal point is not limited, please write a high-precision algorithm
4. Write a virus
while (1)
{
int *p = new int[10000000];
}
5, do not use extra space, will be a, b two linked list of elements of * merge
6, the tree serialization to exist in the array or list
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.