2012 PPS Written Test C + + questions

Source: Internet
Author: User

1. There are 16 cards are a peach a Q 4 spades J 8 4 2 7 3 plum K Q 5 4 6 Square a 5 professor John in this 16 card draw a color to tell a, the number told B, A and b occurred the following dialogue;
A: I don't know what the card is.
B: I know you don't know what the card is.
A: But now I know what the cards are.
B: I know you know what the cards are.

What's the card, please?

2. There are 11 table tennis, there is a shoddy product, the product is lighter, there is no weight of the balance, at most only three times can find shoddy products. How to weigh.


3. Pointers and reference differences (over two points)

1. The pointer is an entity, and the reference is only an individual name; 2. The reference does not need to be dereferenced (*) and the pointer needs to be dereferenced; 3. A reference can be initialized only once at the time of definition, and then immutable; the pointer is variable; 4. The reference cannot be null, the pointer can be empty; 5. " The sizeof reference "gets the size of the variable (object) pointed to, and the" sizeof pointer "gets the size of the pointer itself (the address of the variable or object pointed to); 7. Pointer and reference self-increment (+ +) operation has different meanings;

4. Write a function to determine whether the system is big-endian or small-end way?


5. Define a 128-bit shaped class Int28, and implement a function that determines whether a Int128 is a prime number


6. An ordinary binary tree is known, and a function is written to transform the binary tree from the normal binary tree to the search fork.


7. List the IPC you know


8. Enumerate what API functions are available on the TCP server, and if the calls to these functions are related, please list them in order.


9. Illustrate the MVC pattern.










2012 PPS Written Test C + + questions

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.