Object Oriented Programming
Object Oriented Programming
QUESTION BANK
UNIT - I
PART - A
1. What are the quality issues for evaluating the software products?
2. Write down the various programming approaches.
3. Write some languages in procedure-oriented programming.
4. What are the drawbacs in procedure-oriented programming?
!. "#pand and define $$%.
&. Write any 4 features of $$%.
'. Write some languages in $$%.
(. Write down the basic concepts in $$%.
). *efine ob+ects and classes. ,ive an e#ample.
1-. *efine data abstraction and data encapsulation.
11. *efine inheritance. ,ive an e#ample.
12. *efine polymorphism. ,ive an e#ample.
13. *efine operator overloading and function overloading.
14. *efine dynamic binding.
1!. *efine message passing and write down the steps.
1&. *ifferentiate ob+ect oriented programming and ob+ect based programming.
1'. What are the benefits of $$%?
1(. ,ive some applications of $$%.
1). What is an abstract class?
2-. Write down the access specifiers in .//.
21. Write the 2 components of a class. ,ive an e#ample.
22. *efine nested class with an e#ample.
23. What is local classes?
24. What is friend function?
2!. What is inline functions?
PART - B
1. 0riefly discuss about the $$% concepts.
2. *istinguish between the following terms1
a2 $b+ects and .lasses
b2 *ata abstraction and *ata encapsulation
c2 3nheritance and polymorphism
d2 *ynamic binding and message passing
3. Write the structure of a .// program and e#plain about the compiling and running process.
4. "#plain about the access modifiers in .// with an e#ample.
!. 0riefly discuss about the operators in .//.
&. Write a .// program to illustrate arrays.
'. Write a .// program to illustrate function pointers.
UNIT II
PART - A
1. *efine a constructor.
2. Write the characteristics of a constructor.
3. What is meant by parameteri4ed constructor?
4. *efine copy constructor with an e#ample.
!. What is dynamic constructors?
&. What are the operators used for dynamic constructors?
'. *efine a destructor. 5ow it can be represented?
(. 6ention the operators that cannot be overloaded.
). Write the synta# for overloading a operator.
1-. Write any 4 rules for overloading operators.
11. What is a wrapper class?
12. *ifferentiate constructor and operator in case of type conversion.
13. *efine the insertion and e#traction operator in .//.
14. *efine function ob+ects.
1!. Write the 2 main functions of constructors.
PART - B
1. Write a .// program to illustrate multiple constructors.
2. Write a .// program to illustrate dynamic allocation of constructors.
3. Write a .// program to illustrate operator overloading through friend functions.
4. Write a .// program to illustrate assignment operator overloading.
!. *iscuss about the 3 cases of type conversions with suitable e#ample.
UNIT - III
PART - A
1. What is the use of templates?
2. *efine template class and write the synta#.
3. *efine function template and write the synta#.
4. Write the use of e#port eyword.
!. *efine e#ceptions.
&. What are the types of e#ceptions?
'. What are the 3 eywords used in e#ception handling?
(. What is the use of try and catch bloacs?
). Write the synta# for e#ception specification.
1-. Write the use of throw.
11. ,ive some e#amples for e#ceptions.
12. What is terminate e#ception?
13. What is une#pected e#ception?
14. What are the drawbacs of e#ception handling?
PART - B
1. "#plain about class templates with an e#ample.
2. "#plain about function templates with an e#ample.
3. "#palin about e#ception handling mechanism with an e#ample.
4. Write a .// program to throw any e#ception.
!. "#plain about e#ception specification with an e#ample.
UNIT - IV
PART - A
1. Write the advantage of inheritance.
2. What are the types of inheritance?
3. *efine base class and derived class.
4. *efine single inheritance with an e#ample.
!. *efine multilevel inheritance with an e#ample.
&. *efine multiple inheritance with an e#ample.
'. *efine hierarchical inheritance with an e#ample.
(. *efine hybrid inheritance with an e#ample.
). *ifferentiate compile time and runtime polymorphism.
1-. Write some constraints for virtual functions.
11. *efine a virtual table.
12. Write the use of this pointer.
13. Write the abbreviation for 7883 and write the use of it.
14. What is the use of virtual destructors?
1!. *efine typeid and dynamic9cast.
1&. *efine cross casting.
1'. *efine downcasting.
1(. What is typeinfo ob+ect?
PART - B
1. Write a .// program to illustrate multiple inheritance.
2. "#plain about different types of inheritance with neat e#ample.
3. Write a .// program to illustrate array of pointers.
4. Write a .// program to reverse a string using pointers and arrays.
!. Write a .// program to illustrate pointers to ob+ects and array of pointers to ob+ects.
&. Write a .// program to illustrate this pointer.
'. Write a .// program to illustrate virtual and pure virtual functions.
(. 3llustrate about tyeid with e#amples.
). Write a .// program to illustrate dynamic cast.
UNIT - V
PART - A
1. *efine a stream and write its types.
2. *efine input stream and output stream.
3. Write some e#ample for predefined streams in .//.
4. What are the 2 types of 3:$?
!. Write the use of 3:$ manipulators and give e#ample.
&. Write e#amples for ios functions.
'. Write the difference between manipulators and ios functions.
(. *efine a file.
). Write e#amples for file handling streams.
1-. Write the methods in file handling.
11. ;bbreviate and write the use of eof<2.
12. What are the pointers used for random access?
13. *efine seriali4ation.
14. Write the different 3:$ modes.
1!. What is namespace and global namespace?
1&. Write the use of !"ing eyword.
1'. Write the use of std namespace.
1(. Write some string operations.
1). *efine and abbreviate =8>.
2-. What are the basic principles of =8>?
21. *efine a container and give some e#amples.
22. Write the advantages of =8>.
PART - B
1. 0riefly e#plain about unformatted 3:$ operations with e#amples.
2. 0riefly e#plain about formatted 3:$ operations with e#amples.
3. Write a .// program to illustrate manipulators.
4. Write a .// program to illustrate binary files.
!. "#plain about the components of =8>.
&. Write a .// program to illustrate iterators.
'. 0riefly discuss about the string operations.
OB#E$T ORIENTE% PRO&RA''IN&