Subject Code:140705
GUJARAT TECHNOLOGICAL UNIVERSITY
--- Content provided by FirstRanker.com ---
BE - SEMESTER-IV (OLD) EXAMINATION - WINTER 2018
Subject Name: Object Oriented Programming with C++
Time: 02:30 PM TO 05:00 PM
Date: 14/12/2018
Total Marks: 70
--- Content provided by FirstRanker.com ---
Instructions:
- Attempt all questions.
- Make suitable assumptions wherever necessary.
- Figures to the right indicate full marks.
Q.1
--- Content provided by FirstRanker.com ---
- Explain the basic concepts of Object Oriented Programming. [07]
- Describe various operators in C++. [07]
Q.2
- Describe following terms in C++ with suitable examples. Function overloading, Function Overriding , Call by reference [07]
- 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]
--- Content provided by FirstRanker.com ---
OR
- 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
- Discuss the use of static data members and static member functions with examples. [07]
- What is a constructor? Explain types of constructors with examples. [07]
--- Content provided by FirstRanker.com ---
OR
- 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]
Q.4
- Explain the type conversion from basic type to class type and from class type to basic type with proper example. [07]
- 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]
--- Content provided by FirstRanker.com ---
OR
- What is Exception? Explain Exception Handling Mechanism. Write a program that demonstrates use of multiple catch. Add at least three catch block in your Program. [07]
Q.5
- Explain Runtime polymorphism. Explain and demonstrate, how virtual function to achieve runtime polymorphism? [07]
- Write a C++ program that creates inventory of items by storing item_code, item name and qty. Access the data using pointers. [07]
--- Content provided by FirstRanker.com ---
OR
- What is a stream? Describe various stream classes for console I/O operations. [07]
- What is Template? Write General format of class templates and function Template. Write program to swap Number using Function Template. [07]
Q.5
- Write a program that reads a text file and creates another file that is identical except that every character is in upper case. [07]
--- Content provided by FirstRanker.com ---
- (1) Explain new and delete operator. What are the advantages of new operator over malloc? [04]
- (i1) Explain Scope Resolution Operator with example. [03]
--- Content provided by FirstRanker.com ---
This download link is referred from the post: GTU BE/B.Tech 2018 Winter Question Papers || Gujarat Technological University