< Back to Tests


C++ Test 2

1. Which is used to store value

function
variable
operator
data

2. The program can access the private members of a class ?

the program cannot access the private members of a class in any way
directly
only through other private members of the class
only through other public members of the class

3. A ________ is called automatically each time an object is created is

contractor
variable
constructor
method

4. Size of NULL is

0 byte
1 byte
4 byte
2 byte

5. The C++ operator used to allocate memory is _________

malloc
delete
new
memory

6. A program can directly access the _____ members of a class

private
protected
public
All

7. A pointer is

the address of a variable
a variable for storing addresses
the data type of an address variable
an indication of the variable to be accessed next