Department of Technical Education & Board of Technical Examinations 2008 Diploma Computer Science and Technology C++ - Question Paper
2008 May - C++ ques. Paper
IV Semester Diploma Examination, April/May 2008
OBJECT ORIENTED PROGRAMMING WITH C++
Time : 3 Hours ]
Notej (1) Section - I is compulsory.
(2) Answer any two fill I questions trom each of thc remaining Sections.
1. (a) Fill in the blanks :
(i) Binding data and function together is called
(ii). Member function defined inside .a class declaration are treated as functions
*
(iii) _is used to convert Basic type to ciass type.
(iv) A construction that takes no argument:-; is calico _____constructor.
(v) _are am time anomalies.
(b) List the steps in Object-Oriented Design.
2. , (a) What are the noticeable features of Object - Oriented Programming ? 5
Viii; iianuc;
(b) What do you mean by
(i) Objects
(ii) Polymorphism
(iii) Inheritance
6
(c) Write a C++ program to find the sum of array elements.
i
3 (a) What are reference variables ? Illustrate the passing of reference variables to
function. 5
(b) Explain with example the use of scope resolution operator. 5
/
(c) What is a Class ? Explain the general syntax of a class declaration. 5
\
CS-03
7
i*
4. (a) \\ hai aiv inline functions V How do they differ from regular function ? 5
(b; VVhai is a Constructor ? Explain the concept of overloading a constructor with p.i: >pcr example. - 6
(c) Why static data members are used within a class ? What are the characteristics of Static data member ? 4
5. (a) Write' a C--1- program to add two complex numbers. Use friend function for
addition 10
(b) What are the rules for overloading an operator ? 5
6. (a) Illustrate functions overloading with an appropriate example program. 5
(b) What are different forms of inheritance ? Explain each from with an example. 10
(a) ih>vA do \ou access public/members of an object using pointers ? Explain with piopci example. f 5
(b) W hat is a virtual function ? What is its use and when do you make a virtual function pure ? 4
*
(c) Distinguish between the following : 6 (i) Private access specifies and Protected access specifier
t ii) Base class and derived class (m) cm and cin.getiine( )
8. (a) W hai aie manipulators ' L.ist any 5 manipulators with their meaning arid
equivalent IOS functions. 6
%
(b) Discuss the various forms ofget(J function supported by the input stream/ 4
(c) Describe the various classes available for file operations. 5
c). (a) A tile contains a list of telephone nos. Each record contains the name and the
telephone of each customer. Write a program to create a file using class object to store each set of data. 9
(b) Explain the classic software development cycle with necessary diagram. 6
10. (a) What is the use of a template ! Give the general format for a function template. 5
(b) Write a program containing a possible exception. Use a try block to throw it and a catch block to handle u properly. 8
(c) r:\piai;-. how \vhile( fin > statement detects the end of a file. 2
Attachment: |
Earning: Approval pending. |