FirstRanker Logo

FirstRanker.com - FirstRanker's Choice is a hub of Question Papers & Study Materials for B-Tech, B.E, M-Tech, MCA, M.Sc, MBBS, BDS, MBA, B.Sc, Degree, B.Sc Nursing, B-Pharmacy, D-Pharmacy, MD, Medical, Dental, Engineering students. All services of FirstRanker.com are FREE

📱

Get the MBBS Question Bank Android App

Access previous years' papers, solved question papers, notes, and more on the go!

Install From Play Store

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

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

This post was last modified on 20 February 2020

This download link is referred from the post: GTU BE/B.Tech 2018 Winter Question Papers || Gujarat Technological University


FirstRanker.com

Firstranker's choice

Seat No.:

--- Content provided by FirstRanker.com ---

Enrolment No.

GUJARAT TECHNOLOGICAL UNIVERSITY

BE - SEMESTER-1V (NEW) EXAMINATION - WINTER 2018

Subject Code:2140705

Subject Name:Object Oriented Programming With C++

--- Content provided by FirstRanker.com ---

Time: 02:30 PM TO 05:00 PM

Date:12/12/2018

Total Marks: 70

Instructions:

  1. Attempt all questions.
  2. --- Content provided by FirstRanker.com ---

  3. Make suitable assumptions wherever necessary.
  4. Figures to the right indicate full marks.

Q1

  1. Differentiate Object Oriented Programming (OOP) and Procedure Oriented Programming (POP). (03 MARKS)
  2. Write a C++ program to find out the sum and average of three numbers using nesting of member function. (04 MARKS)
  3. --- Content provided by FirstRanker.com ---

  4. Describe the basic structure of a C++ program with all necessary blocks. (07 MARKS)

Q2

  1. When can you make function inline? What are the advantages of making function inline? (03 MARKS)
  2. Following is a main() program. (04 MARKS)

    void main()

    --- Content provided by FirstRanker.com ---

    { time T1; int duration = 85; T1 = duration;
    }
    Where time is a class which contains variables hrs and minutes. duration stores total time in minutes. Define a class time with necessary functions to break-up the duration in maximum hours and remaining minutes and store them into hrs and minutes respectively.
  3. Write a C++ program. that overloads + operator to add two complex numbers. (07 MARKS)

OR

  1. Write a C++ program to find volume of cube, cylinder and rectangular box using concepts of function overloading. (07 MARKS)

    (volume of ‘cube = s3, volume of cylinder is π*r2*h, volume of rectangular box is l*b*h)

    --- Content provided by FirstRanker.com ---

Q3

  1. An unsigned int can be twice as large as the signed int. Explain how? (03 MARKS)
  2. Write a C++ program to swap the values of pair of integers using function and call by reference. (04 MARKS)
  3. Explain various forms of inheritance with suitable diagrams and example of each. (07 MARKS)
  4. --- Content provided by FirstRanker.com ---

OR

  1. Differentiate structure and class in C++. (03 MARKS)

FirstRanker.com

  1. Consider following class declarations. (04 MARKS)

    class ABC;

    --- Content provided by FirstRanker.com ---

    class XYZ{ int X;
    public: void get_x(int i) {x=i;} friend void sum(XYZ,ABC);
    }; class ABC{ int y;
    public: void get_y(int i) {y=i;} friend void sum(XYZ,ABC);
    };
    By considering above class declarations, define a function sum() at outside the class to find out the sum of x and y and display the result. Also define the main() which satisfy above class declarations.
  2. --- Content provided by FirstRanker.com ---

  3. List out the characteristics of constructor in C++. Write a program to illustrate the use of copy constructor. (07 MARKS)

Q4

  1. Differentiate between late binding and early binding. (03 MARKS)
  2. Describe different ways to open file with suitable example. (04 MARKS)
  3. Define polymorphism? How is it achieved in C++? Explain with suitable example. (07 MARKS)
  4. --- Content provided by FirstRanker.com ---

OR

Q.4

  1. Describe the syntax and use of set () function with suitable example. (03 MARKS)
  2. Explain virtual base class with a program. (04 MARKS)
  3. Demonstrate the use of static variables and static functions with a program. (07 MARKS)
  4. --- Content provided by FirstRanker.com ---

Q.5

  1. Describe the significance of this pointer with suitable example. (03 MARKS)
  2. Explain following file modes. (04 MARKS)
    1. ios::app
    2. ios::out
    3. ios::binary
    4. --- Content provided by FirstRanker.com ---

    5. ios::nocreate
  3. Define Exception? Explain Exception Handling Mechanism. Write a program that demonstrates use of multiple catch. (07 MARKS)

OR

Q.5

--- Content provided by FirstRanker.com ---

  1. Explain pure virtual function with suitable example. (03 MARKS)
  2. Describe the various approaches by which we can detect the end of file condition. (04 MARKS)
  3. Write a C++ program to copy the contents of a file A.txt into another file B.txt. (07 MARKS)

FirstRanker.com


--- Content provided by FirstRanker.com ---


This download link is referred from the post: GTU BE/B.Tech 2018 Winter Question Papers || Gujarat Technological University