A. Hello world
B. Hello
C. world
D. Compilation error <--
3. Which statement is not correct?
A. Object similarity means those objects have same type of data.
B. A class can be considered as a model.
C. An object is an instance of a class or a structure.
D. Two instances of a class have different identities. <--
A. Cannot assign value to pi in the class. <--
B. Cannot assign zeros to the parameters in the constructor.
C. Should define a default constructor.
D. Return type of area() should be int.
5. Which statement is correct?
A. Constructors must be public.
B. Constructors can be private. <--
C. Default copy constructor can do deep copy.
D. Default constructor initializes data members to zeros.
6. Which statement is not correct?
A. In a class, a static function member cannot use a non-static data member.
B. In a class, a static function member can use a static data member.
C. In a class, a non-static function cannot use a static data member. <--
D. In a class, a non-static function can use a static data member.
@shadow fiend: rethink all three. It is legal to take an address of a memory location. While std::string has operators, there is no std::string in the crucial part of the question. 6A requires something, but is not always impossible.