Paper IV - Object Oriented Programming with C++
Time: Three Hours Maximum: 100 marks
Part A - ( 20 x 2 = 40 marks)
Answer ALL the questions
- State advantages of providing default argument in function
- Define abstract class
- What is used to destroy an object? illustrate
- define identifier.
- What are the applications of void data type in C++?
- Mention the use of default constructor.
- What is an object?
- State any two advantages of new operator.
- What is conversion function?
- What is stream?
- Define preprocessor.
- What is the use of private visibility mode? Illustrate
- Define array pointers
- When do you use delete function?
- Illustrate the use of setw functions in C++
- Name any four non-printable characters.
- Define data hiding.
- What is a template?
- Define static data member.
- When do you use ifstream class in C++?
PART B ( 5x12 = 60 Marks)
Answer ALL the questions - (a) When do we use the public and protected visibility modes in C++? Explain.
(b) Write a C++ program to find the average of two values using friend function.
or - (a) What do you mean by dynamic constructors explain with example.
(b) Write a C++ program to concatenate two strings using + operator - (a) Explain the type conversion and type casting.
(b) What are the console i/o operations? Explain.
or - (a) Explain the use of pointer in derived class with suitable example.
(b) Exemplify the use of command line arguments in C++ - (a) What is meant by anonymous union? Illustrate with an example.
(b) Explain the use of inline functions with an example
or - What are the control statements used in C++? explain with examples.
- What is operator overloading? Explain how unary and binary operators are overloaded.
or - What is an exception handler? What are the key words used to handle the exception in C++? Explain.
- Explain how mulitple inheritance differ from multilevel inheritance. Illustrate with examples.
or - Explain the connection between Ploymorphism and Virtual functions. Demonstrate the use of virtual functions using C++ codes.