Anna University - OBJECT ORIENTED PROGRAMMING (OOPS) - Question Bank

Share this article :
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

ACADEMIC YEAR 2011- 2012 / ODD SEMESTER

Question Bank

Subject Code/Name: CS1202/Object Oriented Programming

Year / Sem : III / V
Department : EEE


UNIT – I

OBJECT AND CLASSES


PART – A (2 MARKS)

1. Define Object Oriented Programming.

2. Define Objects.

3. What are the features of Object oriented programming.

4. Define Encapsulation and Data hiding.

5. Define Data Abstraction.

6. Define Data members.

7. Define Member functions.

8. Define Inheritance.

9. Define Polymorphism.

10. List and define the two types of Polymorphism.

11. Define Dynamic Binding.

12. Define Message Passing.

13. List some benefits of OOPS.

14. List out the applications of OOP.

15. What is the return type of main ()?

16. List out the four basic sections in a typical C++ program.

17. Define Token. What are the tokens used in C++?

18. Define identifier. What are the rules to be followed for identifiers?

19. State the use of void in C++.

20. Define an Enumeration data type.

21. Define reference variable. Give its syntax.

22. List out the new operators introduced in c++.

23. What is the use of Scope resolution operator?

24. List out the memory referencing operators.

25. Define Implicit Conversion.

26. What is call by reference?

27. What are inline functions?

28. State the advantages of Default Arguments.

29. Define Function overloading.

30. Define friend function.

PART – B

1. Explain the basic concepts of Object oriented programming (16)

2. Explain the use of constant pointers and pointers to constant with an example.(16)

3. 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)

4. a. Write a C++ program using inline function. (8)

b. Write a C++ program to illustrate the static function (8)

5. Explain briefly about function overloading with a suitable example. (16)

6. a. Discuss constant and volatile functions. (8)

b. What is linkage specification and also explain its need. (8)

7. Explain about call by reference and return by reference with program. (16)

8. Explain Nested classes and local classes with an example (16)


UNIT – II CONSTRUCTORS AND OVERLOADING 

PART – A (2 MARKS)

1. Define Constructor.

2. List some of the special characteristics of constructor.

3. Give the various types of constructors.

4. What are the ways in which a constructor can be called?

5. What is meant by dynamic initialization of objects.

6. Define Destructor.

7. List some of the rules for operator overloading.

8. What are the types of type conversions?

9. What are the conditions should a casting operator satisfy?

10. How the objects are initialized dynamically?


PART – B

1. a. Explain the copy constructors with an example? (8)
b. Explain explicit Constructors, Parametrized Constructors, and multiple Constructors with suitable example. (8)

2. a. How to achieve operator overloading through friend Function? (8)
b. Write a program using friend functions for overloading <<and>>operators? (8)

3. Explain the wrapper classes with examples? (16)



UNIT – III


INHERITANCE AND POLYMORPHISM

PART – A (2 MARKS)

1. What are types of inheritance?

2. Give the syntax for inheritance.

3. Define single inheritance.

4. Define multi-level inheritance.

5. Define multiple inheritance.

6. What is an abstract class?

7. What are the types of polymorphism?

8. Define ‘this’ pointer.

9. What is virtual function?

10. When a function is declared as virtual, C++ determines which function to

11. What is pure virtual function?

12. Define RTTI.

13. What is cross casting?

14. What is down casting?

PART – B

1. Explain the different types of polymorphism (16)

2. Explain various types of Inheritance. (16)

3. Describe Pure Virtual function with an example. (16)

4. Write a C++ program using this pointer. (16)

5. Write a C++ program using dynamic_const. (16)

6. Explain in detail about cross casting and down casting. (16)


UNIT – IV


FILE MANIPULATION

PART – A ( 2 MARKS )

1. Define manipulators and also mention the manipulators that are used in C++.

2. What is the need for streams?

3. List some predefined streams.

4. What are the possible types that a file can be defined?

5. What are the two methods available for opening the files?

6. What is global namespace?

7. Write any four operations possible on string objects.

8. What are the advantages of using generic algorithm?

9. What is STL?

10. What is find()?

11. What are the ways that a string object can be created?

PART – B

1. Explain about Formattted and Unformatted IO with suitable Example (16)

2. What is manipulator? Difference between manipulators and ios Function? (16)

3. Explain the process of open,read,write and close files? (16)

4. Explain the role of seekg(),seekp(),tellg(),tellp(),function in the process of

random access in a binary file (16)

5. Explain about the STD Namespace (16)

6. Explain the Standard Template Library and how it is working? (16)


UNIT – V


TEMPLATE AND EXCEPTION HANDLING

PART – A (2 MARKS)


1. What is the need for template function in C++? What are their advantages?

2. What are the drawbacks of using macros?

3. What is Function Template?

4. What are the components of Exception Handling?

5. What is Uncaught Exception?

6. What is the terminate () functions?

7. What are the disadvantages of the exception handling?


PART – B


1. Explain the Function template (16)

2. Explain the class template (16)

3. What is the need for exception handling (16)

4. Explain the following function

5. a) What are specifications? In which case are they needed? (8)

b)What are the disadvantages of the exception handling mechanism? (8)

6. When do we need multiple catch blocks for a single try block? Give an example? (16)
 

V+ Blog - Education News and Study Materials - Copyright  © 2012 All Rights Reserved | Powered by Anna University News and Announcement | Back to TOP