-
Polymorphism
What are the issue one should care implementing polymorphism.
-
Dangers of public unsigned, diamond-shaped inheritance
What is the danger of using public unsigned integers within a class?In a diamond-shaped inheritance hierarchy, how to ensure that only 1 copy of parent is created?
-
Concatenate two circular linked lists
Write a program to concatenate two circular linked lists into a single circular list.
-
Static and friend function in a class
Use of static and friend function in a class
-
Will the program run successfully?
Main(){ int a=2.9; float b=9; cin>>"%d %f">>a>>b; return();}
-
-
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
-
Do Nothing Constructor
What are Default Constructor and Do Nothing Constructor
-
Deallocation of memory
When we allocates the memory using malloc() and calloc(), it returns pointer pointing to the base address to the allocated memory. But while freeing the memory we call free(pointer) thenHow the operation system knows that how much memory is about to be free.
-
Empty Class Size
What is the size of an empty class?
-
Matrix Operation using Operator Overloading
Write a program for four atrithmetic operations in matrix using operator overloading.
Nested Classes
Do Nested Clases exists? If so, where are they used?
Virtual Constructor
Why constructor cannot be virtual in C++?
C++ Type Conversion
Why does 'float' accept 'int' but not 'char'?
Classes
The copy constructor of class Money is called in which of the following cases?Choose one answer. a. Money amount1;Money amount2(amount 1); b. void func(Money amount);[...]Money amount1;[...]func(amount1); c. Money func();[...]Money amount1 = func(); d. all of the above
Memory Allocation
When is memory allocated for a function of a class? Is it when the program is complied, or only when the function is called?
What is the Size of an Empty Class
What is the logic behind size of an empty class = 1? (As per C++)Ex:class base {};main(){printf("Size of the Empty Class is: %dn", sizeof(base));}It gives output: Size of the Empty Class is: 1I have not got the reason / logic behind this.Can anyone help me?
Constructor initialization lists
What is advantage of using Constructor initialization lists?
Ans