0% found this document useful (0 votes)
19 views4 pages

CPP QuestionBank

Uploaded by

shraddhavinod1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views4 pages

CPP QuestionBank

Uploaded by

shraddhavinod1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Q1) Attempt any EIGHT of the following.

(Out of Ten)

1) What is extraction and insertion operator?

2) Explain any two manipulators.

3) Define constructor.

#4) What is inline function.

5) What is reference variable? What is its major use.

6) What is Abstraction and Encapsulation.

7) What is compile - Time polymorphism.

8) What is default argument.

#9) What is the use of scope resolution operator.

10) What are the access specifiers used in C++.

11) Explain tellg() and tellp() with syntax.

12) Explain any two manipulators.

13) What is destructor?

14) What are the visibility tables used in C++.

15) What is extraction and insertion operator?

16) What is abstraction and Encapsulation?

17) What is default argument in function?

18) Write any two uses of scope resolution operator.

19) What is static Polymorphism.

20) Explain structure of C++ program.

21) What is Encapsulation?

22) Define the following terms

i) Early Binding

ii) Late Binding

23) Explain get() and put () function.

24) What is stream?

25) Define Friend function.

26) Explain the use of new operator, state the syntax.

27) State the need of virtual keyword.

28) State user defined data types in C++.


Q2) Attempt any FOUR of the following (out of FIVE).

1) List different types of constructor. Explain any one constructor with example.
2) What is function overloading? Explain with suitable example.
3) Describe different types of inheritance,
4) Explain virtual base class with suitable diagram.
5) Describe file manipulators with their syntaxes.
6) Explain operator overloading in C++ with an example.
7) Explain memory allocation for objects with non-static data member and static data
member.
8) What is pure virtual function and explain with the help of example program.
9) Explain Dynamic constructor with suitable example.
10) What is inheritance and explain the hierarchical inheritance.
11)Explain memory management operators with the help of suitable example.
12) Explain memory allocation for objects with non-static data member and static data
member.
13) When do we make a class virtual base class? Explain it with suitable example
14) Explain array of object in C++ with example.
15) Explain any four formatted input/output functions.
Q3) Attempt any FOUR of the following (out of FIVE).

1) Write a C++ program to copy contents of one file to another file.


2) Write a C++ program to copy the contents of a text file into another text file.
3) Write a C++ program to read contents of a text file and count number of characters.
Words and lines in a file.
4) Write a program to calculate area and circumference of a circle using inline function.
5) Write a C++ program to calculate factorial of integer number by using inline function.
6) Write a C++ program to calculate square and cube of integer number by using inline
function.
7)Write a C++ program to create a class which contains two data members. Write member
functions to accept, display and swap two entered numbers using call by reference.
8)Write a C++ program to create a class which contains two data members. Write member
functions to accept, display and swap two entered numbers using call by reference.
9) Design C++ class which contains function count(). Write a program to count number of
time count() is called. (Use static data member.)
10) Design C++ class which contains function display(). Write a program to count number of
times display() is called. (use static data member).
11) Write a C++ program to create a class customer which contains data members as C_id,
C_name, C_Salary. Write member functions to accept and display customer information,
also display information of customer having maximum salary.
12) Write a C++ program to create a class Book which contains data members as B-Id. B-
Name, B-Author, B- publication. Write member functions to accept and display Book
information also display count of books. (Use static data member to maintain count of
books)
13) Declare a class of vehicle. Derived classes are two wheeler, three wheeler and four
wheeler. Display the properties of each type of vehicle using member functions of class.
14) Write a C++ program to use setfile () and setiosflags () manipulator.
15) Write a C++ program to compare two strings using overload operator"=="
Q4)Attempt any FOUR of the following (out of FIVE).

1) Explain try, catch and throw in exception handling.


2) Design C++ class which contain function display (). Write a program to count number of times display ()
function is called (Use static data member)
3) What is Destructor? State the importance of destructor with example.
4) What is tokens in C++? Explain in detail.
a) Explain object as function arguments? Explain with the help of an example program.
b) Explain different characteristics of friend function.
#c) What is class Template? Explain syntax of class template with suitable example.
d) Write a program to overload binary + operator to add two strings.
a) Can we pass class object as function arguments? Explain with the help of an example.
b) Explain various stream classes used to perform console input/output (1/0) operations.
#c) What is class Template? Explain syntax of class template with suitable example.
d) Write a program to perform addition of two matrices using operator overloading

Q5) Write a short note on any TWO of the following (out of THREE) [3×2=6]

1) Call-by-value and call-by-reference


2) Data abstraction
3) Default Argument
4) This pointer
5) function overriding
#6) Exception handling.
7)Pointer to object with example
8) Operator overloading

You might also like