Natchatran

NATCHATRAN

Natchatran Blogs includes Technical Tutorials, E-books, Notes, Lab Manual, Question Banks, Viva questions and Interview questions for engineering students, provides all study material for cse students.

-Natchatran(Prem Anandh.J)

Friday, May 10, 2013

CS 2203 - OBJECT ORIENTED PROGRAMMING Question Bank


UNIT -I
PART-A (2 MARKS)
1.             Define Object Oriented Programming.
  1. 0Write the difference between oop and pop
  2. Define class.
  3. Define Objects.
  4. What are the features of Object oriented programming.
  5. Define Encapsulation and Data hiding.
  6. Define Data Abstraction.
  7. Define Data members.
  8. Define Member functions.
  9. Define Inheritance.
  10. Define Polymorphism.
  11. List and define the two types of Polymorphism.
  12. Define Dynamic Binding.
  13. Define Message Passing.
  14. List some benefits of OOPS.
  15. List out the applications of OOP.
  16. How are data and functions organised in an object oriented programming?
  17. Write any four features of OOPS.
  18. What are the Basic concepts of OOS?
  19. Give any four advantages of OOPS.
  20. Give any four applications of c++.
  21. What is keyword?
  22. What is a scope resolution operator and what is use of that?
  23. What do you mean by enumerated data type?
  24. What are symbolic constants?
  25. What do you mean by dynamic initialization of variables?
  26. What are reference variable?
  27. What is member-dereferencing operator?
  28. List out the memory referencing operators.
  29. What is the return type of main ()?
  30. List out the four basic sections in a typical C++ program.
  31. What is a Datatype?
  32. Define pointer.
  33. What do you meant by reference variable?
  34. Define typecast operator
  35. Define Token. What are the tokens used in C++?
  36. Define identifier. What are the rules to be followed for identifiers?
  37. State the use of void in C++.
  38. Define reference variable. Give its syntax.
  39. List out the new operators introduced in c++.
  40. What is function prototype?
  41. What is an inline function?
  42. Write some situations where inline expansion may not work.
  43. Compare private and public access specifiers in a class.
  44. What is a default argument?
  45. State the advantages of Default Arguments.
  46. What are the constant arguments?
  47. What is call- by- reference?
  48. What is the difference between return by reference and call by reference?
  49. What is an encapsulation?
  50. What is static data member?
  51. What is static member function?
  52. How the objects are used as function argument?
  53. Define const member.
  54. Define pointers to member.
  55. Difference between structure and union.
  56. Define Bit Fields
  57. What is polymorphism? What are its types?
  58. What is function overloading? Give an example.
  59. Compare function overloading and default arguments.
  60. What are the uses of references in functions?
  61. What are Friend functions? Write the syntax
  62. Define friend function.
  63. Write a simple c++ pgm to swap two nos without using temp variables
  64. Write some properties of friend functions.
PART-B (16 MARKS)
  1. Illustrate the function overloading concept with a C++ program to find the volume of cube and cylinder
  2. Explain the basic concepts of oops with suitable Examples(16)
  3. Write a C++ program to construct student mark list for three subjects.
  4. Write the pgm to display name,rollno,marks,avg and total.Use clss and objects.
  5. Explain the control structures in C++
  6.   (a) Explain the merits and demerits of object oriented methodology. (8)
   (b) Write notes on Standard Template Library. (8)
  1. Define Call by reference and Return by reference.
  2. Explain about call-by-reference and pointer types with program.(8)
  3. Describe the advantages of OOP. (8)
  4. What are the difference between pointers to constants and constant to pointers? (8)
  5. Describe the applications of OOP technology. (8)
  6. What is function invocation? Explain briefly with program. (8)
  7. Explain about structure pointer operator and unions with program.(8)
  8. Explain in detail the following principles of object oriented programming 
(i)            Data encapsulation and data hiding
(ii)           Inheritance and polymorphism
(iii)          Generic programming.

  1. (i)Explain the idea of Classes, Data abstraction and encapsulation. (8)
    (ii) Write a C++ program that inputs two numbers and outputs the largest number using class.(8)
  2. Explain about static member and this pointer with suitable code.(8)
  3. (i)What are the rules to be followed in function overloading, (4)
(ii) Write a C++ program that takes either two integers or two floating point numbers and outputs the smallest using class friend function and function overloading (12)
  1.  Explain the use of constant pointers and pointers to constant with an example.(16)
  2. a) State the differences between class and struct and also illustrate with an example.(8)
b) What are the difference between pointers to constants and constant to pointers? (8)
  1.  a). Write a C++ program using inline function. (8)
b). Write a C++ program to illustrate the static function (8)
  1. Discuss constant and volatile functions. (8)
  2. Explain Nested classes and local classes with an example (16)

UNIT -II
PART-A (2 MARKS)
  1. Define constructor.
  2. Define default constructor.
  3. Define parameterized constructor.
  4. Define default argument constructor.
  5. What is the ambiguity between default constructor and default argument constructor?
  6. Define copy constructor.
7.       Define dynamic constructor.
  1. Define destructor.
  2. Define multiple constructors.
  3. Can the parameter of a copy constructor be passed by value? Justify your answer.
  4. Compare constructor conversion and operator conversion.
  5. Write some special characteristics of constructor.
  6. How the objects are initialized dynamically?
  7. What are the ways in which a constructor can be called?
  8. What is meant by dynamic initialization of objects.
  9. What is operator overloading?
  10. List out the operators that cannot be overloaded.
  11. What is the purpose of using operator function? Write its syntax.
  12. Write at least four rules for Operator overloading.
  13. How will you overload Unary & Binary operator using member functions?
  14. How will you overload Unary and Binary operator using Friend functions?
  15. How an overloaded operator can be invoked using member functions?
  16. How an overloaded operator can be invoked using Friend functions?
  17. List out the operators that cannot be overloaded using Friend function.
PART-B (16 MARKS)
  1. Explain about Data Handling and member function. Explain copy constructor and destructor with suitable C++ coding
  2. Explain about Unary Operator and Binary Operator Overloading with program.
  3. Define the polymorphism. Explain the different types of polymorphism.
  4. List out the rules for overloading operators with example.
  5. Explain about new and delete Operators Overloading with program.
  6. Explain about member Operator Overloading with program.
  7. a). Explain the copy constructors with an example? (8)
b). Explain explicit Constructors, Parametrized Constructors, and multiple Constructors with suitable example. (8)
  1. a). How to achieve operator overloading through friend Function? (8)
b). Write a program using friend functions for overloading <<and>>operators? (8)
  1. Explain the wrapper classes with examples? (16)
  2. Create a class complex to represent complex number with overloaded addition and multiplication operators. Use them in a main program.(16)
  3. Define a class string with appropriate constructors, destructor and overloaded +, =, and = = operators use them in a main driver program.
UNIT –III
PART-A (2 MARKS)
  1. What is an Exception?
  2. Define try and catch.
  3. Define Exception handling.
  4. Give the general syntax for throw.
  5. What are the components of Exception Handling?
  6. What is Uncaught Exception?
  7. What is Function Template?
  8. What is the terminate () functions?
  9.  What are the disadvantages of the exception handling?
  10. What is the need for template function in C++? What are their advantages?
11.    What are the drawbacks of using macros?
12.    Distinguish between overloaded functions and function templates.
13.    What is this pointer? How is it available to member functions of a class?
PART-B (16 MARKS)
  1. Explain about Template and its types with example.
  2. Explain the Function template (16)
  3. Explain the class template (16)
  4. Explain about Exceptions Handlers and Standard Exceptions.
  5. Details for Exception Handling with Program.
  6. What is the need for exception handling (16)
  7. Explain the following function
    1. What are specifications? In which case are they needed? (8)
    2. What are the disadvantages of the exception handling mechanism? (8)
  8. When do we need multiple catch blocks for a single try block? Give an example? (16)
  9. Write a C++ program containing a possible exception. Use a try block to throw it and a catch block to handle it properly.(16)
UNIT -1V

PART-A (2 MARKS)
  1. What are types of inheritance?
  2. Give the syntax for inheritance.
  3. What is meant by inheritance?
  4. What is meant by single inheritance?
  5. What is multiple inheritances?
  6. What is hierarchical inheritance?
  7. What is multilevel inheritance?
  8. What is hybrid inheritance?
  9. What is meant by Abstract base class?
  10. What are the types of polymorphism?
  11. Define ‘this’ pointer.
  12. Write short notes on virtual base class.
  13. What are the virtual functions?
  14. Write some of the basic rules for virtual functions
  15. What are pure virtual functions? Write the syntax.
  16. Give any rules for Virtual Functions.
  17. What is Visibility mode?
  18. Give two types of template.
  19. Define RTTI.
  20. Why do we need RTTI?
  21. Write about typeid.
  22. What is the use of typeid in RTTI?
  23. List the different type of casting operator.
  24. What is dynamic casting?
  25.  What is cross casting?
  26.  What is down casting?
PART-B (16 MARKS)
  1. Explain the different types of polymorphism (16)
  2. Explain various types of Inheritance. (16)
  3. What are the virtual functions? Explain their needs using a suitable example. What are the rules associated with virtual functions? (16)
  4. What are the different forms of inheritance supported in c++? Discuss on the visibility of base class members in privately and publicly inherited classes.
  5. What are the different forms of inheritance? Give example for them.(16)
  6. Create an abstract base class shape with two members base and height, a member function for initialization and a pure virtual function to compute area ( ). Derive two specific classes Triangle and Rectangle which override the function area ().  Use these classes in a main function and display the area of a triangle and a rectangle. (16)
  7.  
                     i.            What are abstract classes? Give an example (with the program) to illustrate the use of abstract classes.(10)
                   ii.            Write about composite object.(6)
  1. Briefly explain about real time type information (RTTI). (16)
  2. Write notes on Typing conversions and derived class with program.
  3. Explain in detail about cross casting and down casting. (16)

UNIT –V

PART-A (2 MARKS)

1.       Define Streams.
2.       What are the input and output streams?
3.       Classify the streams.
4.       Define manipulators and also mention the manipulators that are used in C++.
5.       What is the need for streams?
6.       List some predefined streams.
7.       What are the possible types that a file can be defined?
8.       What are the two methods available for opening the files?
9.       Difference between get (), put ().
10.    How to open and close a file?
11.    Write some file opening modes.
12.    Define File modes.
13.    What is a file pointer?
14.    What is command-line argument?
15.    What is an error and error handling functions?
16.    How will you create manipulators?
17.    Write the syntax and use of getline () and write () functions.
18.    Write any four operations possible on string objects.
19.    What are the advantages of using generic algorithm?
20.    What is STL?
21.    What is find( )?
22.    What are the ways that a string object can be created?
PART-B (16 MARKS)
  1. Discuss about Streams and stream classes (16)
  2. Write notes on Formatted and Unformatted Console I/O Operations.(16)
  3. Explain about File Pointers and Manipulations with example.
  4. Discuss about manipulators and file streams with Program. (16)
  5. Write on Details about File modes and File I/O.
  6. Explain the process of open,read,write and close files? (16)
  7. Explain the role of seekg(),seekp(),tellg(),tellp(),function in the process of
  8. Random access in a binary file (16)
  9. Write a program to demonstrate random access to file.(8)
  10. Write a program to extend a namespace.(8)
  11. Explain about the STD Namespace (16)
  12. Explain the Standard Template Library and how it is working? (16)

No comments: