C++ Programming Questions Answers - Set 2
-
36. Stacks are based on ?
- FIFO
- LIFO
- FILO
- All of above
Answer And Explanation
Answer: Option B
Explanation:
-
37. An explicitly defined destructor function
- may be virtual
- may not be virtual
- will always be virtual
- will never be virtual
Answer And Explanation
Answer: Option A
Explanation:
-
39. int *ptr[5];
- a pointer of 5 int elements
- an array of 5 int pointers
- an array of 5 elements returning an int value
- none of above
Answer And Explanation
Answer: Option B
Explanation:
-
40. When a structure refers to itself, it is known as ?
- encapsulated structure
- nested structure
- recursive structure
- self-referential structure
Answer And Explanation
Answer: Option D
Explanation:
-
41. Destructors are called ?
- not defined
- in any order
- in the reverse order of constructor calls
- in the same order of constructor calls
Answer And Explanation
Answer: Option C
Explanation:
-
42. The members of a class are ?
b) by default are private
c) are made private by declaring as private
d) none of the above]
- have no visibility by default
- public by default
- private by default
- protected by default
Answer And Explanation
Answer: Option C
Explanation: