Download GTU BE/B.Tech 2018 Winter 4th Sem Old 140705 Object Oriented Programming With C++ Question Paper

Download GTU (Gujarat Technological University) BE/BTech (Bachelor of Engineering / Bachelor of Technology) 2018 Winter 4th Sem Old 140705 Object Oriented Programming With C++ Previous Question Paper

www.FirstRanker.com
1
Seat No.: ________ Enrolment No.___________

GUJARAT TECHNOLOGICAL UNIVERSITY

BE - SEMESTER ?IV (OLD) EXAMINATION ? WINTER 2018
Subject Code:140705 Date: 14/12/2018

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 basic concepts of Object Oriented Programming. 07
(b) Describe various operators in C++. 07

Q.2 (a) Describe following terms in C++ with suitable examples.
Function overloading, Function Overriding , Call by reference
07
(b) What is Inline Function? In which Situation Inline Function may not work? How
does an Inline function differ from a preprocessor macro? Write program using
Inline Function to find largest of three numbers.
07
OR
(b) Explain Friend function and its characteristics. Define a class matrix with an
integer array of 2*2 as a data member. Define a friend function, which adds two
matrix objects and returns resultant matrix object.
07

Q.3 (a) Discuss the use of static data members and static member functions with
examples.
07
(b) What is a constructor? Explain types of constructors with examples. 07
OR
Q.3 (a) Define Inheritance. Write the types of Inheritance. Explain Inheritance with
example. Consider Example with respect to print Student Details like name,
enrollment no, SPI and department.
07
(b) Explain the type conversion from basic type to class type and from class type to
basic type with proper example.
07

Q.4 (a) Define a class complex with real and imaginary as two data member, add
necessary constructors and member function to initialize and display data of
class. Class should overload the + operator to add two complex objects and return
the results. Invoke the statements like C3=C1+C2 in main ().
07
(b) What is Exception? Explain Exception HandlingMechanism. Write a program
that demonstrates use of multiple catch. Add at least three catch block in your
Program.
07
OR
Q.4 (a) Explain Runtime polymorphism. Explain and demonstrate, how virtual function
to achieve runtime polymorphism?
07
(b) Write a C++ program that creates inventory of items by storing item_code, item
name and qty. Access the data using pointers.
07

Q.5 (a) What is a stream? Describe various stream classes for console I/O operations. 07
(b) What is Template? Write General format of class templates and function
Template. Write program to swap Number using Function Template.
07






www.FirstRanker.com www.FirstRanker.com
www.FirstRanker.com
FirstRanker.com - FirstRanker's Choice
www.FirstRanker.com
1
Seat No.: ________ Enrolment No.___________

GUJARAT TECHNOLOGICAL UNIVERSITY

BE - SEMESTER ?IV (OLD) EXAMINATION ? WINTER 2018
Subject Code:140705 Date: 14/12/2018

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 basic concepts of Object Oriented Programming. 07
(b) Describe various operators in C++. 07

Q.2 (a) Describe following terms in C++ with suitable examples.
Function overloading, Function Overriding , Call by reference
07
(b) What is Inline Function? In which Situation Inline Function may not work? How
does an Inline function differ from a preprocessor macro? Write program using
Inline Function to find largest of three numbers.
07
OR
(b) Explain Friend function and its characteristics. Define a class matrix with an
integer array of 2*2 as a data member. Define a friend function, which adds two
matrix objects and returns resultant matrix object.
07

Q.3 (a) Discuss the use of static data members and static member functions with
examples.
07
(b) What is a constructor? Explain types of constructors with examples. 07
OR
Q.3 (a) Define Inheritance. Write the types of Inheritance. Explain Inheritance with
example. Consider Example with respect to print Student Details like name,
enrollment no, SPI and department.
07
(b) Explain the type conversion from basic type to class type and from class type to
basic type with proper example.
07

Q.4 (a) Define a class complex with real and imaginary as two data member, add
necessary constructors and member function to initialize and display data of
class. Class should overload the + operator to add two complex objects and return
the results. Invoke the statements like C3=C1+C2 in main ().
07
(b) What is Exception? Explain Exception HandlingMechanism. Write a program
that demonstrates use of multiple catch. Add at least three catch block in your
Program.
07
OR
Q.4 (a) Explain Runtime polymorphism. Explain and demonstrate, how virtual function
to achieve runtime polymorphism?
07
(b) Write a C++ program that creates inventory of items by storing item_code, item
name and qty. Access the data using pointers.
07

Q.5 (a) What is a stream? Describe various stream classes for console I/O operations. 07
(b) What is Template? Write General format of class templates and function
Template. Write program to swap Number using Function Template.
07






www.FirstRanker.com www.FirstRanker.com
www.FirstRanker.com
www.FirstRanker.com
2

OR
Q.5 (a) Write a program that reads a text file and creates another file that is identical
except that every character is in upper case.
07
(b) (i) Explain new and delete operator. What are the advantages of new operator
over malloc?
04
(ii) Explain Scope Resolution Operator with example. 03

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

This post was last modified on 20 February 2020