This download link is referred from the post: GTU BE 2019 Summer Question Papers || Gujarat Technological University
GUJARAT TECHNOLOGICAL UNIVERSITY
SEMESTER-IV(NEW) - EXAMINATION - SUMMER 2019
--- Content provided by FirstRanker.com ---
Subject Code:2140705 Date:25/05/2019Subject Name: Object Oriented Programming With C++
Time:02:30 PM TO 05:00 PM Total Marks: 70
Instructions:
1. Attempt all questions.
--- Content provided by FirstRanker.com ---
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 04
example.
--- Content provided by FirstRanker.com ---
(c) What is call by reference and return by reference? Explain with a 07suitable example.
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++ 07
--- Content provided by FirstRanker.com ---
program.OR
(c) Write characteristics of static data member and static member 07
function. Explain the concept of static data member and static
member function with a C++ program.
--- Content provided by FirstRanker.com ---
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 04
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);
--- Content provided by FirstRanker.com ---
(c) What is a constructor? Explain different types of constructors with 07an appropriate example.
OR
Q.3 (a) Explain inline function with suitable example. 03
(b) What is the use of destructor in C++? Explain with a suitable 04
--- Content provided by FirstRanker.com ---
example.(c) Explain runtime polymorphism. Explain and demonstrate, how 07
virtual function to achieve runtime polymorphism?
Q.4 (a) Describe the use of "this" pointer with an example. 03
(b) Explain following functions with example 04
--- Content provided by FirstRanker.com ---
1. put()2. get()
(c) Explain various forms of inheritance with diagrammatic illustrations. 07
Also explain any one type of inheritance with an appropriate
program.
--- Content provided by FirstRanker.com ---
ORQ.4 (a) Explain visibility mode with its types. 03
(b) Write a program that uses following functions: width(), precision(). 04
(c) Write a following C++ program to explain objects as function 07
arguments. Define a class name “Point” with two data member
--- Content provided by FirstRanker.com ---
variable x and y, member function for getting the value of membervariable 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,y1) and point
--- Content provided by FirstRanker.com ---
Q(x2,y2) Euclidean distance = sqrt((x2-x1)^2 + (y2-y1)^2)]Q.5 (a) Describe various stream classes for console I/O operations. 03
(b) Write a C++ program to handle Exception “division by zero” 04
situation.
(c) What is the general format of function template? Write a C++ 07
--- Content provided by FirstRanker.com ---
program for bubble sort using template functions.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 04
using template.
--- Content provided by FirstRanker.com ---
(c) Explain STL with its core components. 07--- Content provided by FirstRanker.com ---
This download link is referred from the post: GTU BE 2019 Summer Question Papers || Gujarat Technological University