Programming - C++ Language
You Are Here :: Home > C++ Language > Interfaces - General Questions
7.
What is similar to interface in c++
A.
methods
B.
instance of class
C.
pure abstract class
D.
none of the mentioned
Answer: Option C
Explanation:
8.
Which of the following implements the module in the program?
A.
macro
B.
header files
C.
both of the mentioned
D.
none of the mentioned
Answer: Option B
Explanation:
We can include the group of code by using the #include header file.
9.
How many sets of requirements are need in designing a container?
Answer: Option C
Explanation:
There are three sets of requirements. They are container interface requirements, Allocator interface requirements and iterator requirements.
10.
Which interface in the container is required for storage management?
A.
Memory management
B.
Allocater interface
C.
Memory interface
D.
None of the mentioned
Answer: Option B
Explanation:
11.
Which is present in the basic interface of the allocator interface?
A.
Set of typedefs
B.
A pair of allocation functions
C.
allocate()
D.
All of the mentioned
Answer: Option D
Explanation:
The basic interface of an allocator class consists of a set of typedefs, a pair of allocation functions, allocate() and deallocate() and a pair of construction/destruction members, construct() and destroy().
12.
Which container provides random access iterators?
A.
vector
B.
deque
C.
sort
D.
Both a & b
Answer: Option D
Explanation:
« prev
next »