Tuesday, December 7, 2010

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD MCA-II Semester Supplementary Examinations July/August 2010 OBJECT ORIENTED PROGRAMMING

Code No: 22002

Time: 3hours
Max.Marks:60

Answer any Five questions

All questions carry equal Marks

1. a) Write a C++ program to reverse a number by using while loop.
b) Differentiate between OOP and Procedure Oriented Programming.

2. a) Explain the enumerated data types with an example.
b) Write a program to initialize a matrix by using preprocessor.

3. a) Differentiate between a constructor and a function.
b) Explain the friend function with an example.

4. a) What is Virtual base class? Explain multi path inheritance with an example.
b) Write a program to add to complex numbers by using operator overloading concept.

5. a) Differentiate between static and dynamic binding.
b) Write a program to access members of base and derived classes using pointer objects of both classes.

6. a) Explain the Stream State functions.
b) Write a program to display octal and hexadecimal equivalent of decimal number ranging from 100 to 200.

7. a) Differentiate between Templates and function overloading.
b) Write a program to find maximum of two given numbers using templates.

8. a) Write a program to find the sum of 1000 natural numbers providing for exception when the Sum exceeds the INT_MAX and Print the Sum till then and the natural number added to the sum last.
b) What is exception? Explain how the exceptions are handled in C++?

No comments:

Post a Comment