0% found this document useful (0 votes)
51 views2 pages

C++ QP 22

Uploaded by

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

C++ QP 22

Uploaded by

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

GBGS SGHEMIE

BPLCK205D/BPLCKD20S
USN 3 N 9C o6 5
June/July 2023
Second Semester B.E./B.Tech. Degree Examination,
Introductionto C++ Programming
Mux. Marks: 100
Time: 3 hrs.
ONE full question fromeach module.
Note: 1. Answer any FIVEfull questions, choosing
Course outcomes.
2. M: Marks, L.: Bloom 's level, C:
M C
Module1
10 L2 CO1
Q.1 Explain the basic C++ program syntax with an example. 10 L2 CO1
example.
b. What is the need of abstract class in C++? Discuss with an
OR
L2 CO1
Q.2 a. Discuss object and classes in brief. L3 C02
b. Write down the syntax and example to create a class. 10 1.2 CO1
C. Define the terms:
(i) Message passing (ii) Abstraction (iii)Encapsulation
(iv)Inheritance (v) Polymorphism
Module -2
10 L2 CO1
Q.3 a. Explain scope resolution operator with an example program.
10 L2 CO1
b. What is a token? List the various types of token and explain in brief.
OR
10 L2 C04
Q.4 a. Illustrate the use of inline functions with a program. L3 C05
a function that uses call 10
b. Write a C++t program to swap 2 values by writing
byreference technique.
Module-3
forms of 10 L2 CO2
Q.5 a. What does inheritance mean in C++? What are the ditferent
inheritance? Give an example for each.
and car. The class 10 L3 COS
b. Suppose we have three classes vehicle, four wheeler it and the
vehicle is the base class, the class four wheeler is derived from
class car is derived from the class four wheeler.
So, if we invoke the methods in this order, car ), four wheel( ) and
vehicle(), then the output will be
Iam a car.
Ihave four wheels.
Iam a vehicle.
Write aC++ program to demonstrate multilevel inheritance using this.
OR
function? 5 L2 CO2
Q.6 a. What is aconstructor? How do we invoke a constructor
L2 CO2
b. Describe the importance of destructors. (ii) run time, with 10 L2 CO4
C. How is polymorphism achieved at (i) compile time
an example program.
Module-4
10 L2 CO1
Q.7 a. Write a note on VO streanns.
which a 10 L2 CO2
b. What are the various types of files? What are the various modes in
file can bc opened with an example program?
OR
Explain the uses ofifstream and ofstream classes for file input and output. 10 L2 CO2
Q.8 a.
b. Write a C+t program to create a text file created or not, if created it will 10| L3 (03
Write some text into the file and then read the text from the file.
Iof 2
BPLCK205D/BPLCKD205
Module - 5
Q.9 a. Define exception. Explain different blocks of exception handling. 10 L2 CO1
b. Write afunction which throws a division by zerocxception and catch it in 10 L4 CO4
catch block. Write a C++ program to demonstrate usage of try, catch and
throw to handle exception.

OR
Q.10 a. Discuss catching classtype as exception and rethrowing an exceptions. 10 L4 CO3
b Write aC+t program function which handles array of bounds exception 10 L3 CO2
using C++.

0 9

0 6

0 1 :

0 2 2

Aff

You might also like