25 câu hỏi
The size of a class with no data members and member functions is ___ bytes
0
1
4
A class is called as abstract base class if it has a ___ function
pure virtual
static
private
Run-time or dynamic allocation of memory may be done using the C++ operator ___ .
new
alloc
malloc
Operator overloading permits to extend the applicability of existing C++ operators so that they work with new ___ or ___.
data types, objects
data types, constant
data types, pointer
A ___ is a set of instance or values.
class
object
function
C++ programming language was designed and developed by ___ at ___.
Steven Job, AT&T Bell Labs
Bjarne Stroustrup, AT&T Bell Labs
Guido van Rossum, M&D Lab
C++ is a ___ programming language with ___ extensions.
procedural, object oriented
object, procedural
procedural, STL
Pointers are ___ that contain the addresses of other variables and ____ .
value, object
object, class
variables, functions
A program can use the address of any variable in an expression, except variables declared with the ___ storage class.
static
register
auto
New operator allocates memory blocks from the ___.
Stack
Heap
Register
The new operator throws a ___ when heap is exhausted.
runtime exception
syntax error
logic error
The (assert.h) header is used for ___ .
debugging
checking memory leak
library for time
The constructor and destructor of a class in C++ are called ___
automatically
manually
none of above
Two or more functions may have the same name, as long as their ___ are different.
return type
parameter lists
none of above
A constructor with default arguments for all its parameters is called a ___ constructor.
static
run-time
default
Static member functions can access only the ___ data members of a class.
dynamic
static
public
The two types of polymorphism is : ____ & ____ .
Run time and compile time
Preprocessor, compile time
Preprocessor, Linker
A file stream is an extension of a ___ stream.
console
windows
none of above
The Standard Template Library(STL) is a library of ___ templates.
container class
time class
none of above
Run time polymorphism is ___ than the compile time polymorphism.
less flexible
more flexible
none of above
With private inheritance, public and protected members of the base class become ___ members of the derived class.
private
public
protected
The STL Container adapters contains the ___ , ___ and ___ STL containers.
Stack, Queue, Priority_queue
Set, Multiset, Map
vectors, lists, deques
The ___ block contains code that directly or indirectly might cause an exception to be thrown.
catch
try
none of above
When writing function or class template, one use a ___ to specify a generic data type.
template parameters
keyword
none of above
Data items in a class may be public.
TRUE
FALSE
