×
My under eye areas maybe dark but my future will be bright and that is more important.
--Your friends at LectureNotes
Close

Previous Year Exam Questions of Object Oriented Programming Using Cpp of bput - OOP by Verified Writer

  • Object Oriented Programming Using Cpp - OOP
  • 2017
  • PYQ
  • Biju Patnaik University of Technology Rourkela Odisha - BPUT
  • Civil Engineering
  • B.Tech
  • 1233 Views
  • 58 Offline Downloads
  • Uploaded 1 year ago
0 User(s)
Download PDFOrder Printed Copy

Share it with your friends

Leave your Comments

Text from page-1

Registration No: Total Number of Pages: 02 B.T.ech PCI5H003 5th Semester Regular Examination 2017-18 C++ & Object Oriented Programming BRANCH:CIVIL Time: 3 Hours Max Marks: 100 Q.CODE: B258 Answer Question No.1 and 2 which are compulsory and any four from the rest. The figures in the right hand margin indicate marks. Q1 a) b) c) d) e) f) g) h) i) Answer the following questions: multiple type or dash fill up type What makes a class abstract? The class must not have method definitions. The class must have a constructor that takes no arguments. The class must have a function definition equal to zero. The class which cannot be instantiated as they are mainly for inheritance. Which of the following concept of oops allows compiler to insert arguments in a function call if it is not specified? a. Call by value b. Call by reference c. Default arguments d. Call by pointer How many instances of an abstract class can be created? a. 1 b. 5 c. 13 d. 0 . Which of the following cannot be friend? a. Function b. Class c. Object d. Operation function Which of the following concepts means adding new components to a program as it runs? a. Data hiding b. Dynamic typing c. Dynamic binding d. Dynamic loading Which of the following correctly describes overloading of functions? a. Virtual polymorphism b. Transient polymorphism c. Ad-hoc polymorphism d. Pseudo polymorphism Which of the following is NOT correct 2D array declaration? (A) int m[ ] [3] = {1 , 2 , 3, 4} ; (B) int m[3][ ] = {1 , 2 , 3, 4} ; (C) int m[2][3]; (D) int m[R] [C]; (R & C are constants) Which of the following must be present in switch construct? (A) Expression in ( ) after switch (B) default (C) case followed by value (D) All of these Why is user defined copy constructor required? a. there is no implicit copy constructor in C++ b. when pointers are involved implicit copy constructor does not give correct result (2 x 10)

Text from page-2

j) Q2 a) b) c) d) e) f) g) h) i) j) Q3 a) b) Q4 a) b) Q5 a) b) Q6 a) b) Q7 a) b) Q8 a) b) Q9 a) b) c. both a and b d. none Pure virtual function is used a. to give meaning to derived class function b. to give meaning to base class function c. to initialize all functions d. None Answer the following questions: Short answer type What are the basic concepts of oops? What will be the output of following codes. x=6 ; cout <<x<<x++<<++x ; Define comma operator and its use with example. Differentiate between encapsulation and abstraction. When do we declare a member of class static? How dynamic initialization of objects is is achieved? What is friend function ?What is importance in OOP? Define manipulators with its example. Explain the concept of Overriding with example. What are the different blocks used in exception handling. (2 x 10) Explain the following concepts of object oriented programming in detail with an example. (i) Data abstraction (ii) Inheritance (iii) Polymorphism (iv) Objects. Write a c++ program to find the largest number among 10 elements in an array. (10) List out the rules for operator overloading. With a suitable example explain operator overloading. Explain copy constructor with suitable C++ coding. (10) Differentiate between static binding and dynamic binding. Explain each mechanism with suitable examples. Explain Inline function in C++. (10) What do you mean by virtual function? Differentiate it from pure virtual function with examples. Write a C++ program to read from 2 files simultaneously. (10) Define polymorphism. Explain the different types of polymorphism and its advantages. Describe virtual function with suitable example. (10) Explain different types of inheritance concepts with suitable examples and diagrams. Write a C++ program that will give the conditions of environment required, food habits and unique characteristics of pet animals fish and dog. Define a base called pet that describe any common household pet; two derived classes called fish and dog with items specific to that type of animals. Write pure virtual functions in the base class for operations that are common to both types of animals. Write a program to test the usage of classes. (10) Discuss the need for exception with try, catch and throw keywords and draw the exception handling model. What is class template? Write the syntax for class template. Write an example program for class template. (10) (5) (5) (5) (5) (5) (5) (5)

Lecture Notes