|
Section A (10 marks each) |
| 1. |
(a) Write the advantage of Object Oriented language. |
| |
(b) What is the precedence
of assignment operators relative to other operators?
What is their associativity? |
| 2. |
Write a C++ Program to write the first 20 natural
numbers along with their case roots use the:
(a) While Loop
(b) For Loop |
|
Section B (10 marks each) |
| 3. |
(a) Explain the recursion with the help of example. |
|
(b) What arithmetic's operator can be applied on
pointer? Explain. |
| 4. |
(a) Define a structure to store the coordinates of a
point. Hence write a program to find distance between
two points, given their coordinates. |
|
(b). Write a note on enum data types. |
|
Section C (10 marks each) |
| 5. |
(a) What is inline member function? Why we declare a
member function as Inline. |
|
(b) What is Destructor ? Can we overload destructor? |
| 6. |
Define a class to store the coordinates of a point with
member functions to read the coordinates and display the
coordinates. Define a derived with three additional
capability to store the distance of the point from the
origin. Write the additional member function for the
same. Write a program, using the classes defined above
to read the coordinates of a point and find its distance
from the origin. |
|
Section D (10 marks each) |
| 7. |
Explain the function overloading and function overriding
with the help of example. |
| 8. |
(a) With examples describe the various modes in which a
C++ file may be opened. |
|
(b) A file contains the following information about a
set of employees:
(i) Name (ii) Basic Pay (iii) Gross pay (iv)
Other allowances
Write a program to read the name of a file and enter the
information about the employer for direct access. |