PTU B.Tech Electrical Engineering 6th Semester May 2019 71139 OBJECT ORIENTED PROGRAMMING Question Papers

PTU Punjab Technical University B-Tech May 2019 Question Papers 6th Semester Electrical and Electronics Engineering (EEE)-EE-Electrical Engineering

Roll No.
Total No. of Pages : 02
Total No. of Questions : 09
B.Tech.(Electronics & Electrical) (2011 Onwards EL-I) (Sem.?6)
OBJECT ORIENTED PROGRAMMING
Subject Code : BTEEE-603C
M.Code : 71139
Time : 3 Hrs. Max. Marks : 60
INSTRUCTION TO CANDIDATES :
1.
SECTION-A is COMPULSORY consisting of TEN questions carrying T WO marks
each.
2.
SECTION-B contains FIVE questions carrying FIVE marks each and students
have to attempt any FOUR questions.
3.
SECTION-C contains T HREE questions carrying T EN marks each and students
have to attempt any T WO questions.


SECTION-A
1.
Answer briefly :

i.
What are the different data types in C?

ii.
List five reserved words in C.

iii.
What is data encapsulation?

iv.
How does a main() function in C++ differ from main() in C?

v.
Describe the importance of destructors.

vi.
What is dynamic initialization of objects?

vii. What is an abstract class?

viii. When do we make a class virtual?

ix.
Why it is necessary to include the file iostream in all our programs?

x.
What is a generic function?
1 | M-71139

(S2)-205

SECTION-B
2.
Write a C++ program to read a file name and display the content of file on screen.
3.
How is object oriented programming different from procedure oriented programming?
4.
What is a class? How does it accomplish data hiding?
5.
Explain Generic Function with an example.
6.
Discuss error handling during file operation.

SECTION-C
7.
Describe the syntax of single inheritance and multiple inheritances in C++.
8.
Explain default constructor with a C++ example program.
9.
What is runtime polymorphism? How virtual functions can be used to implement the

runtime polymorphism? Explain with an example.









NOTE : Disclosure of Identity by writing Mobile No. or Making of passing request on any
page of Answer Sheet will lead to UMC against the Student.
2 | M-71139

(S2)-205

This post was last modified on 04 November 2019