Wednesday, August 3, 2011

CS 2203 – OBJECT ORIENTED PROGRAMMING QUESTION BANK



CS 2203 – OBJECT ORIENTED PROGRAMMING
QUESTION BANK

Part- A: 2marks each: write with illustrations and syntax:
01.List out the features of a POP.
02.Give the differences between POP and OOP.
03.What are the basic concepts of OOP. Explain a class.
04.Define the term Data abstraction and data encapsulation.
05.Explain the term polymorphism. What are its types?

06.Give the benefits of OOP over POP.
07.What do you know about “Name space”.
08.Write a c++ program to get any two numbers and output the greater one.
09.What are manipulators? What function do they serve?
10.Explain with use, the term In-line functions.

11.Give the situations where in-line functions does not work.
12.What is meant by “function overloading”? What is its syntax?
13.Define a friend function. When is a class called a friend class?
14.Define the term “abstract class”.
15.Give the ways in which the member functions can be declared.

16.What are static member functions? Give the syntax.
17.Explain nested classes.
18.Write a note on the local classes.
19.Define a constructor. Give its syntax.
20.What is a default constructor? What purpose does it serve?

21.Explain-Dynamic constructors.
22.Define operator overloading. Give the syntax.
23.State the operator that cannot be overloaded in a normal function inside class.
24.When we use a friend function for overloading operators, state the restrictions.
25.Give the source and the destination class when the following conversions are
made:
(a)class type to basic type
(b)class A type to class B type
(c)Basic type to class type.

26.Define the term Inheritance. Give its types.

27.Give the derivations (or) visibility for the derived class based on that of the base
class. (private, public and protected derivations).
28.What are Virtual functions? Give the typical prototype.
29.For the following inheritance mention the order of execution of constructors:
(a)class A : public B, virtual public C
(b)class A: public B, public C.
Is there any change in the order of execution in these cases?
30.What is “this” pointer? What purpose does it serve?

31.Give the syntax for overloading << and >> operators?
32.List the ios format functions and their functions.
33.What is fill() used for?
34.List the manipulators, their functions and respective ios equivalents.
35.Give the syntax for designing your own manipulators.

36.What are the file stream classes used for creating input and output files?
37.What are the ways of opening a file? Give the syntax.
38.How will you detect the end-of-file?
39.Give the functions of seekg(), seekp(), tellg() and tellp().
40.What are template? Give its uses and syntax.

41.Explain the differences between function and class templates with syntaxes.
42.What is exception handling? Give a schematic sketch of its mechanism.
43.How will you specify exceptions?
44.When is the handler catch(. . .) used? Give an example.
45.Give the components of STL. Give a schematic sketch of it.

46.What are containers? What are its types?
47.What are iterators? Mention them with the access method, directions of
movement and I/O capability.
48.Distinguish between the various types of containers in pairs.
49.How are STL algorithms implemented?
50.How will you manipulate string objects?

Part- B: 4/8 marks each: write with programs and syntax:

01.Explain in detail the various types involved in Type conversions.

02.In detail discuss the blocks in handling exceptions. Also describe the following:
(a)Re throwing (b)Catch all (c)Restrictions in throwing.

03.(a).Explain the constructors. Give the rules.
(b).What is a copy constructor? How is it implemented?

04.Elucidate the various forms of Inheritance with examples.

05.What are static members and member functions? Give the rules. Illustrate them.

06.Elucidate the types of Containers supported by STL.

07.Explain with examples the basic concepts of OOP.

08.What are friend functions and friend classes? How will use them in overloading
the operators? Show as how will you overload New and Delete operators.

09.Briefly discuss the various types of Iterators.

10.In brief explain the following concepts (a) RTTI (b)Templates (c)Virtual functions.

Concepts based on which the programs are asked:
Friend functions, operator overloading, files opening and closing, templates, inheritance, exception handling, virtual functions & RTTI, type conversion.

Analysis of Questions:
Part – A: All are simple definitions, uses, rules and properties of the various
concepts as given here.
Part – B: Each of (a) and (b) carries two questions. One is a theory worth 4 marks
(or) maximum 8 marks and other one a program for 8-12 marks.

1.Go through all the notes you have for the programs.
2.The programs are familiar. Mainly know the syntax of all concepts.
3.Give a brief introduction of the concepts used and explain your
program with comments and a paragraph about its flow.
4.Give diagrammatic representations wherever possible.

ALL THE BEST AND BEST OF EFFORTS!!!

by,
RANGARAJAN T.R.

1 comment: