Download GTU BE/B.Tech 2019 Summer 4th Sem New 2140705 Object Oriented Programming With C++ Question Paper

Download GTU (Gujarat Technological University) BE/BTech (Bachelor of Engineering / Bachelor of Technology) 2019 Summer 4th Sem New 2140705 Object Oriented Programming With C++ Previous Question Paper

1
Seat No.: ________ Enrolment No.___________
GUJARAT TECHNOLOGICAL UNIVERSITY
BE - SEMESTER ?IV(NEW) ? EXAMINATION ? SUMMER 2019
Subject Code:2140705 Date:25/05/2019
Subject Name: Object Oriented Programming With C++
Time: 02:30 PM TO 05:00 PM Total Marks: 70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.

Q.1 (a) Explain the concept of data abstraction and encapsulation in OOP. 03
(b) Describe the concept of enumerated data Type in C++ with a proper
example.
04
(c) What is call by reference and return by reference? Explain with a
suitable example.
07

Q.2 (a) Write any three benefits of Object Oriented Programming. 03
(b) Explain the use of C++ operators: new and delete. 04
(c) What is function polymorphism? Explain it with an appropriate C++
program.
07
OR
(c) Write characteristics of static data member and static member
function. Explain the concept of static data member and static
member function with a C++ program.
07

Q.3 (a) Explain basic to class type conversion with appropriate example. 03
(b) Write a program to find out product of two private data members p
and q of two classes X and Y using a common friend function.
Assume that the prototype for both the classes will be: void
product(X, Y);
04
(c) What is a constructor? Explain different types of constructors with
an appropriate example.
07
OR
Q.3 (a) Explain inline function with suitable example. 03
(b) What is the use of destructor in C++? Explain with a suitable
example.
04
(c) Explain runtime polymorphism. Explain and demonstrate, how
virtual function to achieve runtime polymorphism?
07

Q.4 (a) Describe the use of "this" pointer with an example. 03
(b) Explain following functions with example
1. put()
2. get()
04
(c) Explain various forms of inheritance with diagrammatic illustrations.
Also explain any one type of inheritance with an appropriate
program.
07
OR
Q.4 (a) Explain visibility mode with its types. 03
(b) Write a program that uses following functions: width(), precision(). 04





FirstRanker.com - FirstRanker's Choice
1
Seat No.: ________ Enrolment No.___________
GUJARAT TECHNOLOGICAL UNIVERSITY
BE - SEMESTER ?IV(NEW) ? EXAMINATION ? SUMMER 2019
Subject Code:2140705 Date:25/05/2019
Subject Name: Object Oriented Programming With C++
Time: 02:30 PM TO 05:00 PM Total Marks: 70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.

Q.1 (a) Explain the concept of data abstraction and encapsulation in OOP. 03
(b) Describe the concept of enumerated data Type in C++ with a proper
example.
04
(c) What is call by reference and return by reference? Explain with a
suitable example.
07

Q.2 (a) Write any three benefits of Object Oriented Programming. 03
(b) Explain the use of C++ operators: new and delete. 04
(c) What is function polymorphism? Explain it with an appropriate C++
program.
07
OR
(c) Write characteristics of static data member and static member
function. Explain the concept of static data member and static
member function with a C++ program.
07

Q.3 (a) Explain basic to class type conversion with appropriate example. 03
(b) Write a program to find out product of two private data members p
and q of two classes X and Y using a common friend function.
Assume that the prototype for both the classes will be: void
product(X, Y);
04
(c) What is a constructor? Explain different types of constructors with
an appropriate example.
07
OR
Q.3 (a) Explain inline function with suitable example. 03
(b) What is the use of destructor in C++? Explain with a suitable
example.
04
(c) Explain runtime polymorphism. Explain and demonstrate, how
virtual function to achieve runtime polymorphism?
07

Q.4 (a) Describe the use of "this" pointer with an example. 03
(b) Explain following functions with example
1. put()
2. get()
04
(c) Explain various forms of inheritance with diagrammatic illustrations.
Also explain any one type of inheritance with an appropriate
program.
07
OR
Q.4 (a) Explain visibility mode with its types. 03
(b) Write a program that uses following functions: width(), precision(). 04





2


(c) Write a following C++ program to explain objects as function
arguments. Define a class name ?Point? with two data member
variable x and y, member function for getting the value of member
variable from user and second member function for displaying the
value of member variable. Define third member function that takes
another Point object as an argument and returns the Euclidean
distance between the two Point objects. [for point P(x1,y 1) and point
Q(x2,y 2) Euclidean distance = sqrt((x2-x1)
2
+ (y 2-y 1)
2
)]
07

Q.5 (a) Describe various stream classes for console I/O operations. 03
(b) Write a C++ program to handle Exception ?division by zero?
situation.
04
(c) What is the general format of function template? Write a C++
program for bubble sort using template functions.
07
OR

Q.5 (a) Explain ios::app, ios::ate and ios::trunc flags. 03
(b) Write a program for swapping two values of different data types
using template.
04
(c) Explain STL with its core components. 07

*************
FirstRanker.com - FirstRanker's Choice

This post was last modified on 20 February 2020