C++ Interview Questions and Answers for Experienced - 2
Question: 6
What is namespace?
Namespace allows us to group a set of global classes, objects and/or functions under a name.
To say it somehow, they serve to split the global scope in sub scopes known as namespace.
Question: 7
What is an object?
Object is a software bundle of variables and related methods. Objects have state and behavior.
Question: 8
What is polymorphism?
Poly means many and morph means form. Polymorphism is the ability of an object (or reference) to assume (be replaced by) or become many different forms of object.
Question: 9
What is scope resolution operator?
A scope resolution operator (::), can be used to define the member functions of a class outside the class.
Question: 10
What are virtual functions?
Virtual functions are used with inheritance, they are called according to the type of object pointed or referred, not according to the type of pointer or reference. In other words, virtual functions are resolved late, at runtime. Virtual keyword is used to make a function virtual.
C++ program with runtime polymorphism (use of virtual functions)
A base class and a derived class.
A function with same name in base class and derived class.
A pointer or reference of base class type pointing or referring to an object of derived class.
- C++ Interview Questions and Answers for Experienced
- Top 200+ C++ Interview Questions and Answers
- C++ Interview Questions and Answers for Freshers
- Advanced C++ Programming Interview Questions and Answers
- C++ Language Interview Questions for Experienced Pdf
- C++ Programs Asked in Interview for Freshers
- C++ Interview Questions and Answers Pdf
- C++ Language Interview Questions and Answers for Freshers Pdf
- C++ Questions and Answers
- Top 250+ C++ Constructor and Destructor Programming Interview Questions
- C++ basic interview questions and answers pdf
- C++ Programming Interview Questions and Answers
- C++ Technical Interview Questions and Answers
- Top 200+ Advanced C++ Interview Questions 2020-2021
- C++ Lab Viva-Practical Exams Questions and Answers
- C++ Coding Interview Questions and Answers
Signals and Systems MCQ Questions and Answers Pdf More
Electrical Power Sources Quiz Questions & Answers Pdf More
Electromagnetic Field Theory Question Bank 2024-2025 More
Power Semiconductor Device and Integrated Circuits Questions More
Strength of Materials Questions and Answers Pdf More
TNPSC Rainwater Harvesting Gk Quiz Questions and Answers More
7000+ Mechanical Engineering MCQ for Competitive Exams 2024 - 2025 More
New Pattern Cloze Test Pdf Download More
Top 1000+ Computer Knowledge Quiz for Competitive Exams More
TNPSC Chemistry Online Test in Tamil and English More