InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What do you mean by Vtable and VPTR in C++? |
| Answer» | |
| 2. |
Explain the difference between Abstract class and Interface in C++? |
| Answer» | |
| 3. |
What is copy constructor? Can we make copy constructor private in C++? |
| Answer» | |
| 4. |
What do you mean by function overriding & function overloading in C++? |
| Answer» | |
| 5. |
What do you mean by friend class & friend function in C++? |
| Answer» | |
| 6. |
Explain the difference between new() and malloc() in C++? |
| Answer» | |
| 7. |
What is constructor and destructor in C++? |
| Answer» | |
| 8. |
What do you mean by inheritance in C++? Explain its types. |
| Answer» | |
| 9. |
Explain the difference between realloc() and free() in C++? |
| Answer» | |
| 10. |
What do you mean by overhead in C++? |
| Answer» | |
| 12. |
What do you mean by volatile and mutable keywords used in C++? |
| Answer» | |
| 13. |
Explain the difference between class and struct in C++? |
||||||||||||||||||
Answer»
|
|||||||||||||||||||
| 14. |
What do you mean by “this” pointer? |
|
Answer» In C++ every object can access its address through this pointer, in other WORDS, it holds the address of the current object or POINTS to the current object. |
|
| 15. |
What do you mean by public protected and private in C++? |
| Answer» | |
| 16. |
What are member functions used in C++? |
|
Answer» A member function of a class in C++ is a function that has its DEFINITION or its PROTOTYPE WITHIN the class LIKE any other variable. Member function operates on an OBJECT of the quality of which it is a member, and it has access to all the members of a class for that object. A member function can be defined inside the class and outside the class. |
|
| 17. |
Please explain the reference variable in C++? |
|
Answer» REFERENCE VARIABLE in C++ is used to give the alternative name to the ALREADY defined variable. There is one condition that the reference variable must be initialized at the time of declaration. The reference VARIABLES are declared by putting ‘&’ in the constitution |
|
| 18. |
What is a Loop? What are different types of loops in C++? |
|
Answer» In C++ LOOP is USED to perform specific repetitive tasks until a condition is satisfied. TYPES OF LOOPS1.FOR LOOP 2. WHILE LOOP 3. DO-WHILE LOOP |
|
| 19. |
What is namespace & why it is used in C++? |
| Answer» | |
| 20. |
Please explain Class & Object in C++? |
|
Answer» Class:- Class is the collection of the same type of objects and objects are the VARIABLES of the type Class and once the Class has been DEFINED any number of objects can be added to that same class. For examples Eagle, Sparrow, Pigeon, CROW are the objects of the Class Bird Objects:- Object is the collection of the entities, and the objects occupy the space in the memory. An object contains data and code. When any PROGRAM is executed the objects interact with each other by sending the messages without knowing their data and code. 8. What is polymorphism & list its types in C++?The simple meaning of polymorphism is more than one form. In C++ a program can have more than one function with the same NAME that can perform different activities Types of polymorphism in C++
|
|
| 21. |
Why is C++ called OOPs? Explain |
|
Answer» C++ is called OOPS because it supports Object-oriented Programming which means C++ look into the problem regarding objects rather than the procedure for doing that problem. 6. What is oops and LIST its features in C++?OOPS STANDS for Object-Oriented Programming.OOPS refers to the programming in which programming is based on the objects that can contain data and code rather than based on the functions and procedures. Features of OOP
|
|
| 22. |
What are the advantages of C++? Explain |
| Answer» | |
| 23. |
Explain the difference between C & C++? |
|||||||||||||||
Answer»
|
||||||||||||||||
| 24. |
What is the latest version on C++? |
|
Answer» The LATEST version of C++ is ISO/IEC 14882:2017 which is ALSO KNOWN as C++17. This is the FIFTH edition. |
|
| 25. |
What is c++ & why it is used? |
|
Answer» C++ is the object-oriented programming LANGUAGE.C++ is considered as one of the most ESTEEMED languages to work with when it comes to OPERATING systems, and games.C++ language is a middle-level programming language designed by Bjarne Stroustrup in the YEAR 1979 in Bell Laboratories. It is an object-oriented language that has features like Inheritance, Polymorphism, Encapsulation, and Abstraction. It is used to teach the graphics libraries in high-level applications and the applications that are used to communicate with devices over the network. |
|