Discuss the feature of Object-Oriented Programming. Differentiate between Object Oriented Programming and any other programming language that you know.
How can you convert the user defined data type into primitive data type and vice versa? Explain both conversion routine with suitable example.
Create a class Stack with suitable data members and member functions to push and pop the elements of the stack. Add the exception when user tries to add item while the stack is full and when user tries to delete item while the stack is empty. Throw exception in both of the cases and handle these exception.
Short Questions
Attempt any eight questions: (8 × 5=40)
“Concept of friend in against the philosophy of Object Oriented Programming”. Explain.
Explain about the importance of constructors and destructors with their execution sequence.
What is template? How can you differentiate a function template from a class template? Explain.
Explain about this pointer with suitable example.
Write a C++ program containing a possible exception. Use a try block to throw it and a catch block to handle it.
Differentiate between compile time polymorphism and run time polymorphism.
What is container class? Differentiate container class from inheritance.
Write a program to demonstrate the use of default argument in functions.
How can you differentiate a macro with an inline function? Are they same or different? Justify.
Define the various ambiguity situations that may occur during the process of inheritance. How can you resolve that ambiguity situation?