C++ Programming Questions with Solutions - 2
Question: 6
In new operator
(A) Each link contains data or a pointer to data
(B) Each link contains a pointer to the next link
(C) Links are stored in an array
(D) An array of pointers point to the links
Ans: B
Each link contains a pointer to the next link
Question: 7
A virtual base class is useful when
(A) It makes sense to use a base class is ambiguous
(B) Identification of a function in a base class is ambiguous
(C) There are multiple paths from one derived class to another
(D) Different functions in base and derived classes have the same name
Ans: B
Identification of a function in a base class is ambiguous
Question: 8
The keyword void is used to declare
(A) Objects that can be modified outside of program control
(B) A synonym for an existing type
(C) A member function that is defined in a subclass
(D) Absence of a type
Ans: C
A member function that is defined in a subclass
Question: 9
Virtual functions allow to
(A) Use same function call to execute member functions of objects from different classes
(B) Group objects of different classes so they can all be accessed by the same function code
(C) Create functions that have no body
(D) Create an array of type pointer to base calls that can hold pointers to derived classes
Ans: A
Use same function call to execute member functions of objects from different classes
Question: 10
Classes are useful because they
(A) Can closely model objects in the real world
(B) Bring together all aspects of an entity in one place
(C) Permit data to be hidden from other classes
(D) Are removed from memory when not in use
Ans: C
Permit data to be hidden from other classes
- Top 150+ C++ Quiz Questions and Answers 2020-2021
- C++ MCQ Questions and Answers
- C++ Multiple Choice Questions and Answers
- C++ Objective Questions and Answers Pdf
- C++ Online Test | Questions and Answers for Gate 2020-2021
- C++ Programming Objective Questions and Answers Pdf
- Top 150+ C++ Programming Quiz Questions and Answers
- C++ Programming MCQ Questions with Answers
- 1000+ C++ Questions and Answers Pdf
- C++ Programming Questions with Solutions
- Top 1,000+ C++ Language Quiz Questions & Answers
Samacheer Kalvi 10th Thermal Physics One Mark Questions with Solutions More
Samacheer Kalvi 10th Science Guide Thermal Physics Questions More
Samarcheer Kalvi 10th Science Guide Optics Questions More
Samacheer Kalvi Class 10 Optics Questions and Answers More
Laws of Motion Class 10 One Mark Questions with Solutions Pdf More
7000+ Computer Awareness for Bank exams Syllabus, Notes, Pdf More
7000+ Microsoft Office MCQ Questions and Answers Pdf More
Top 1,000+ GK Questions and Answers for Bank Exams More
Inventions and Inventors (Discoveries) Quiz in Physics for TNPSC Pdf More
TNPSC Group 4 Previous Year Question Papers with Answers Pdf More