Home News Contact us Blog   Get Listed

Send video songs to your loved ones.

 
Custom Search
 

        Back to PTU Question Paper Home
All Streams

Back to PTU Question Paper - MCA
All Subjects

   
  PTU Previous Question papers -MCA  

  MC 202 -  Object Oriented Programming using C++  (2052)

Note: Section E is compulsory. Attempt any one  Question from section A, B, C and D.
 
 
Section E (2 marks each)
 
Question 9 :
a. State the principal difference between a variable of type int and a variable of type char.
b. What is an expression? What are its components?
c. Compare the use of switch statement with the use of nested if-else statements. Which is more convenient?
d. What is an Array? Give example.
e. Why is only the address of an array's first element necessary in order to access the entire array?
f. What is the difference between public , private and protected?
g. Is it ok to convert a pointer for a derived class to its base class?
h. How can we declare a function as a pure virtual function?
i. What is Operator Overloading?
j Explain the random access file processing.
 
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.
     
 
 
   
© copyright 2008 created by www.citysuvidha.com