Professional Documents
Culture Documents
22 ETC152 Aset 1
22 ETC152 Aset 1
Note: 01. Answer any FIVE full questions, choosing at least ONE question from each MODULE.
*Bloom’s
Module -1 Taxonomy Marks
Level
Q.01 a L2 10
Explain the basic C++ program syntax with an example.
b L2 10
What are abstract classes? Where are they useful? Discuss with an example.
OR
Q.02 a Discuss the terms abstraction, encapsulation, inheritance and polymorphism with L2 10
suitable examples.
Module-2
Q. 03 a What are reference variables in C++. Discuss with examples. L2 10
b Write a program to narrate use of inline functions. Also discuss whether the L3 10
request to make a function as inline is always granted by the compiler?
OR
Q.04 a Discuss expressions and their types with suitable examples. L2 10
b Write a C++ program to demonstrate function overloading for the following L3 10
prototypes.
Module-3
Q. 05 a With an example program for each discuss L3 10
i) Constructors with default arguments
ii) Copy constructure
b Create a class named Shape with a function that prints "This is a shape". Create L3 10
another class named Polygon inheriting the Shape class with the same function
that prints "Polygon is a shape". Create two other classes named Rectangle and
Triangle having the same function which prints "Rectangle is a polygon" and
"Triangle is a polygon" respectively. Again, make another class named Square
having the same function which prints "Square is a rectangle". Now, try calling
the function by the object of each of these classes.
Module-4
Page 01 of 02
22ETC152a/22ETC252a
Q. 07 a With a neat diagram discuss stream class hierarchy in C++. L2 10
b Write a C++ program to create a text file, check file created or not, if created it L3 10
will write some text into the file and then read the text from the file.
OR
Q. 08 a Write the various functions used to open, close, read and write data in text files. L2 10
b Write a C++ program to write and read time in/from binary file using fstream L3 10
Module-5
Q. 09 a Discuss exception handling mechanisms in C++. L2 10
b Write a function which throws a division by zero exception and catch it in catch L3 10
block. Write a C++ program to demonstrate usage of try, catch and throw to
handle exception.
OR
Q. 10 a Discuss catching class types as exceptions and rethrowing an exception with L2 10
examples.
b Write a C++ program function which handles array of bounds exception using L3 10
C++.
*Bloom’s Taxonomy Level: Indicate as L1, L2, L3, L4, etc. It is also desirable to indicate the COs and POs to be
attained by every bit of questions.
Page 02 of 02