The following 5 questions are based on the written memory of the time, not particularly accurate, but the general meaning is expressed, I hope to be a candidate for the C + + development engineers who are helpful.
1.
Class A{char c_a;}; Class B:public class A{int i_a;virtual Funca (); virtual FUNCB ();};
sizeof (A) = _____;
sizeof (B) = _____.
2.
A struct is known:
struct a{ int A; float *b; char c; Double D;};
Wherea takes up _____ bytes andb occupies _____ bytes.
3.
Try to explain why foo1 is better than foo2 performance.
void Foo1 () { ... for (int i=0; i <; i++) { A; B; C; } ...} void Foo1 () { ... for (int i=0; i <; i++) { A; } for (int i=0; i <; i++) { ; } for (int i=0; i <; i++) { C; } ...}
4.
Write an algorithm that will be a given string in the binary code, all "0" of the number, such as the string "HelloWorld" binary code " 0100100001100101011011000110110001101111", the number of all"0"is .
5.
Write an algorithm that writes an integer sequence in the form of a linked list.
struct linka{ int Data; struct Linka *next;}; Voidreserve (Linka &head) {}
2015 Nokia/C + + pen Test