Browse papers
A

Section A: Long Answer Questions

Attempt any TWO questions.

3 questions·10 marks each
1long10 marks

What are templates in C++? Explain function templates and class templates with a program for each.

templates
2long10 marks

What is a copy constructor? When is it called? Explain the difference between a shallow copy and a deep copy with examples.

constructorcopy
3long10 marks

Explain file handling in C++. Write a program to write records to a file and read them back using ifstream and ofstream.

file-handling
B

Section B: Short Answer Questions

Attempt any EIGHT questions.

9 questions·5 marks each
4short5 marks

Explain the four pillars of OOP.

oop-concepts
5short5 marks

What is a copy constructor? Write its syntax.

constructor
6short5 marks

Differentiate between public and private inheritance.

inheritance
7short5 marks

What is the role of the catch block in exception handling?

exception-handling
8short5 marks

Explain the get() and put() functions in file handling.

file-handling
9short5 marks

What is an object? How is memory allocated to an object?

class-object
10short5 marks

Write a short note on virtual destructor.

destructor
11short5 marks

What is a static member function?

static-members
12short5 marks

Explain the cin and cout objects.

io