Browse papers
A

Section A: Long Answer Questions

Attempt any TWO questions.

3 questions·10 marks each
1long10 marks

What is polymorphism? Differentiate between compile-time and run-time polymorphism. Explain with examples how each is achieved in C++.

polymorphism
2long10 marks

Explain the concept of an abstract class and pure virtual function. Write a C++ program to demonstrate an abstract base class 'Shape' with derived classes.

abstract-class
3long10 marks

What is operator overloading? Write a C++ program to overload the unary '++' operator (both prefix and postfix) for a Counter class.

operator-overloading
B

Section B: Short Answer Questions

Attempt any EIGHT questions.

9 questions·5 marks each
4short5 marks

What is abstraction? Differentiate it from encapsulation.

oop-concepts
5short5 marks

Why can't constructors be virtual?

constructor
6short5 marks

What is multiple inheritance? Give an example.

inheritance
7short5 marks

Explain the throw keyword in C++.

exception-handling
8short5 marks

Differentiate between text files and binary files.

file-handling
9short5 marks

What operators cannot be overloaded in C++?

operator-overloading
10short5 marks

What is a generic class?

templates
11short5 marks

Explain the seekg() and seekp() functions.

file-handling
12short5 marks

What is a member initialization list in a constructor?

constructor