-
Using Inheritance
Using inheritance, which of the following is not alloweda) Changing implementation of operation in parent by the subclassb) Using implementation of operation in parent class by the subclassc) Using attributes in parent class by the subclassd) Having operations is subclass which do not exist in parent classe) None
-
Reverse A Linked List
What is the most efficient way to reverse a linklist?
-
Placement New Syntax
How can a C++ developer use the placement new syntax to make new allocate an object of class SomeClass at a particular memory address stored in a pointer type variable named pmem?A. new SomeClass(pmem);B. new(pmem) SomeClass;C. new SomeClass pmem;D. new pmem SomeClass;E. new (pmem, SomeClass);
-
Smart Pointers
What is Smart Pointer in C++?
-
-
Memory Allocation
Why is it suggested not to use malloc() or calloc() in C++ for memory allocation?
-
Program Crash
When can it happen that before calling main function itself program gets crashed?
-
Binary Search Algorithm
Why Binary Search Algorithm is a device and conquer based algorithm?
-
What is an object?
Object is a software bundle of variables and related methods. Objects have state and behavior.
-
-
-
What is friend function?
As the name suggests, the function acts as a friend to a class. As a friend of a class, it can access its private and protected members. A friend function is not a member of the class. But it must be listed in the class definition.
-
Find Type of Triangle
Write a C++ program to find the type of a triangle by reading three sides of a triangle.
-
-
Base Class Destructor
In C++, which of following statements accurately describe a base class destructor calling a virtual function override of a derived class?A. the base class destructor calls the virtual function of the base class and not of the derived class.B. the base class destructor calls the virtual function override of the derived class through th vtable.C. the C++ compiler maintains the overridden virtual function...
-
Multi-Dimension Array Size
If you need a function that will handle multi-dimensional arrays, you must specify the following sizes inside the square brackets.Choose one answer. a. All sizes except the first dimension b. None of the sizes c. All sizes except the last dimension d. All the sizes
-
Exception Handling
Explain the exception handling features of C++ program with a suitable example
-
Private Inheritance question
Hi I very recently did the C++ online Quiz and was surprised to find that my answer (1) to the following question (below) was incorrect. Is there something I am missing here, or is the answer incorrect. I thought this was the point of Private. "Always inaccessible regardless or derivation access".Apparently (3) in the correct answer! according to the quiz!The private member in derived class ...
-
GOD of Two Numbers
Write a C++ program to find the GOD of two numbers
-
Reference Type
Define reference types with example
C++ Interview Questions
Ans