Sp 5
(6 pages) Reg. No. : ........................................
Code No. : 20852 Sub. Code : GAMC 31
B.Sc. (CBCS) DEGREE EXAMINATION,
NOVEMBER 2016.
Third Semester
Mathematics With Computer Application — Allied
PROGRAMMING IN C++
(For those who joined in July 2012 – 2015)
Time : Three hours Maximum : 75 marks
SECTION A — (10 1 = 10 marks)
Answer ALL questions.
Choose the correct answer :
1. The packing of data and functions into a single
component is known as ––––––––––
(a) Encapsulation
(b) Data abstraction
(c) Inheritance
(d) Polymorphism
Sp 5
2. The –––––––––– function can access only static
member variables and functions of the same class.
(a) Static (b) Member
(c) Friend (d) Virtual
3. The –––––––––– constructor copies one object from
another object (ie) to declare and initialize one
object using reference of another object.
(a) Copy (b) Static
(c) Dynamic (d) Parameterized
4. Dynamic destruction means –––––––––– using the
destructor.
(a) releasing memory
(b) allocation of memory
(c) memory creation
(d) none
5. When the binary operators are overloaded using
member functions, then they require ––––––––––
argument.
(a) one (b) two
(c) three (d) zero
Page 2 Code No. : 20852
Sp 5
6. When two or more base classes are used for
derivation of a class, it is called ––––––––––
inheritance.
(a) multiple (b) single
(c) multilevel (d) multipath
7. A –––––––––– is a memory variable that stores a
memory address.
(a) pointer (b) function
(c) array (d) structure
8. When a base class is not used for object
declaration is called as ––––––––––
(a) abstract class (b) derived class
(c) container class (d) local class
9. The –––––––––– is nothing but flow of data in
bytes in sequence.
(a) stream (b) stream class
(c) buffer (d) none
10. The function –––––––––– provides the present
position of the output pointer.
(a) tellp ( ) (b) tellg ( )
(c) seekg ( ) (d) seekp ( )
Page 3 Code No. : 20852
Sp 5
SECTION B — (5 5 = 25 marks)
Answer ALL questions, choosing either (a) or (b).
11. (a) How to achieve data encapsulation in C++?
Describe.
Or
(b) How objects are passed as function
arguments? Discuss with example.
12. (a) Discuss about constructors with arguments.
Or
(b) Write in brief about calling constructor and
destructor member functions.
13. (a) List out the rules for overloading operators.
Or
(b) Discuss in brief about inheritance types with
example.
14. (a) Write about this pointer and its usage.
Or
(b) Discuss in brief about abstract classes.
Page 4 Code No. : 20852
[P.T.O.]
Sp 5
15. (a) Write in brief about file opening modes.
Or
(b) Discuss the functions used for sequential
read/write operations.
SECTION C — (5 8 = 40 marks)
Answer ALL questions, choosing either (a) or (b).
16. (a) Discuss how to define member functions in
C++ with example.
Or
(b) Give a write-up on Local classes through
program example.
17. (a) Explain the copy constructors with example.
Or
(b) Briefly describe about private constructors
and destructors with example.
18. (a) Describe in detail about type conversion
process with example.
Or
(b) Write a C++ program to implement the
multilevel inheritance.
Page 5 Code No. : 20852
Sp 5
19. (a) Write a detailed note on Arrays in C++.
Or
(b) Briefly discuss about virtual and pure virtual
functions with example. Also, list out the
rules for forming that.
20. (a) Explain the manipulators with example.
Or
(b) Discuss in detail about Random file access
with example.
———————
Page 6 Code No. : 20852