0% found this document useful (0 votes)
40 views

Object Oriented Programming

This document contains instructions and questions for an exam on object-oriented programming concepts. It includes: 1. Three short answer questions testing concepts like namespaces, templates, and file input/output functions. 2. Five short answer questions testing concepts like containership, friend functions, inheritance, class diagrams, and operator overloading. 3. Three long answer questions requiring students to create classes and derive classes to demonstrate runtime polymorphism, file input/output, and function overloading.

Uploaded by

mamannish7902
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

Object Oriented Programming

This document contains instructions and questions for an exam on object-oriented programming concepts. It includes: 1. Three short answer questions testing concepts like namespaces, templates, and file input/output functions. 2. Five short answer questions testing concepts like containership, friend functions, inheritance, class diagrams, and operator overloading. 3. Three long answer questions requiring students to create classes and derive classes to demonstrate runtime polymorphism, file input/output, and function overloading.

Uploaded by

mamannish7902
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

TRIBHUVAN UNIVERSITY FACULTY OF MANAGEMENT Office of the Dean 20

F"AA Ma!B'* 50 Ti=e* 2 h!'

BIM ; Thi!< Se=e'te! ; ITC 2 6 * O>?ect O!iente< @!o8!a==in8


Candidates are required to answer the questions in their own words as far as practicable

G!o"# $A%
& B!ief An'(e! )"e'tion'* + 0x , 0i& List the methods of using namespace. ii& What is the advantages of using template? iii& When is seekg function used in program? i.& When is it impossible to create object of the class? .& How can you resolve the ambiguity that occurs in multiple inheritance? .i& Write down the different types of conversions that cannot be handled by the compiler. .ii& What is stored in this pointer? .iii& What is a overloaded function? i/& efine manipulator. /& List the major characteristics of object oriented language.

G!o"# $B%
Sho!t An'(e! )"e'tion 0an1 fi.e2* 2& 4& 5& 3& 6& 7& +3x4, 3efine containership with e!ample. Write a program to add private data members of two classes using a friend function. ifferentiate between " and "##. What is "$"? %ive an e!ample of class diagram. &!plain virtual base class. Write a program that overload the operator # to add two heights with data member cm'int(

G!o"# $C%
Lon8 An'(e! )"e'tion 0an1 th!ee2 +4x3, 39& "reate classes called )mount*+ )mount,+ and )mount-. )mount* has data member $s'float(+ )mount, has data member .aisa'int( and )mount- has data member ollars'/loat(. 0he classes must be defined in such a way that it is possible to convert )mount, into )mount* and )mount* into )mount-. :& "reate classes called person and player. 0he class person does not have data member and player has data member height'int(. /rom these classes derive a class called cricketer with data member runs'int(. )ll the classes must have read and display functions and the program must be implement using runtime polymorphism. 0& Write a program that writes the *1 records of 2ook into file 3L4.5o then display only the 6th record stored in that file. & 7s it possible to convert a function with default argument into a number of overloaded functions without default argument? 8ustify your answer with suitable e!ample.

99999

You might also like