DOEACC Question Paper- Object Oriented Programming & C++


Get the previous years Question Solved Papers of DOEACC 'A' Level. Check the DOEACC Exam Paper code A10.1-R3 of 2006, July.

Here is the complete Set of Questions of DOEACC Society A Level Course Exam Paper (A10.1-R3) of Introduction to Object Oriented Programming & C++ in July,2006.

1. Each question below gives a multiple choice of answers. Choose the most appropriate
one and enter in the "tear-off" answer sheet attached to the question paper, following
instructions therein. (1 x 10)
1.1 Which of the following cannot be passed to a function?
A) Reference variables
B) Objects
C) Header files
D) Array
1.2 Which of the following contains overloaded insertion operator?
A) iostream
B) ostream
C) fstream
D) bufferstream
1.3 Which of the following operator can't be overloaded?
A) new
B) delete
C) +
D) ?:
1.4 Which of the following is not a visibility modifier?
A) private
B) public
C) Char
D) Protected
A10.1-R3 Page 1 of 5 July, 2006
1.5 Operator overloading is called
A) Runtime polymorphism
B) Compile time polymorphism
C) Complex overloading
D) Abstract overloading
1.6 A process of a class can contain object of another class is called
A) Nesting
B) Friend
C) Data Abstraction
D) Encapsulation
1.7 Find out the function which describes special task to an operator
A) operate
B) operand
C) operator
D) opfun
1.8 Which of the following is a method which belong to a string class?
A) Equals ( )
B) Compare ( )
C) Length ( )
D) Substring ( )
1.9 Which of the following loop cause the execution of the code at least once?
A) While
B) Do…While
C) While…. Do
D) For
1.10Which of the following way are legal to access a class data member using this pointer?
A) this.x
B) *this.x
C) *(this.x)
D) (*this).x
A10.1-R3 Page 2 of 5 July, 2006
2. Each statement below is either TRUE or FALSE. Choose the most appropriate one and
ENTER in the "tear-off" sheet attached to the question paper, following instructions
therein. (1 x 10)
2.1 C++ requires const to be initialized.
2.2 When we are using manipulator we are in fact calling a member function.
2.3 We can inherit a new class from the class template.
2.4 When an exception is not caught, the program is aborted.
2.5 A class can inherit the attributes of two or more classes, is known as multilevel inheritance.
2.6 A constructor can be used to convert a class type to basic type data.
2.7 NULL is a keyword.
2.8 The static member variables must be defined outside the class.
2.9 Pure virtual functions can never have a body.
2.10 Creating a derived class from a base class requires a fundamental change to the base class.
3. Match words and phrases in column X with the closest related meaning/ word(s)/phrase(s) in
column Y. Enter your selection in the "tear-off" answer sheet attached to the question
paper, following instructions therein. (1 x 10)
X Y
Object A. Is an associative container
Friend function B. Can't be used to overload operator
Destructor C. Is an operator
Pointer D. Is an insulation of data from direct access by the
program
Data hiding E. Is not used to create objects
Abstract class F. Can be passed as function argument.
Sub class G. Is a constant
Setw H. Is used to de-allocate memory that was allocated for an
object.
Map I. Is a process of binding of data and functions together
into a single class-type variable
Encapsulation J. Is a variable
K. Has a link to a more general class
L. Is an example of a manipulator
A10.1-R3 Page 3 of 5 July, 2006
4. Each statement below has a blank space to fit one of the word(s) or phrase(s) in the list
below. Enter your choice in the "tear-off" answer sheet attached to the question paper,
following instructions therein. (1 x 10)
A. Lifetime B. Ostream C. Calling
D. Structures E. One F. Abstract class
G. Two H. Class name I. Private
J. Default constructor K. Class L. Constant
M. Visibility N. Variable O. Void
4.1 A(n) _______ is user defined data type, which holds both the data and function.
4.2 Member functions defined inside a class specifier are _______ by default.
4.3 Storage classes concerned with the lifetime are ________ of a variable.
4.4 A function that doesn't return anything has return type ___________.
4.5 Character 'A' occupies _______bytes.
4.6 Sending a message to an object is same as ________ member function.
4.7 Data and member function are public in _________ but private in classes, by default.
4.8 A constructor's name is the same as _________.
4.9 Cerr and clog are standard streams of type_________.
4.10 An address of a variable is ________.
A10.1-R3 Page 4 of 5 July, 2006
PART TWO
(Answer any FOUR questions)
5.
a) Explain polymorphism and data hiding in c++ with suitable examples.
b) What happens if we don't use virtual function in inheritance? Explain importance of virtual function
with this reference.
c) Explain with suitable example pointer to object. How can we access function or variable with the
help of pointer to object?
(5+5+5)
6.
a) What is an abstract class? How do you create an abstract class? Explain it using example.
b) Explain copy constructor with example. What is its use?
c) Write a program for class implementation, which takes an age, name and salary of employee.
Use a constructor for initialization of objects. Define a destructor.
(5+5+5)
7.
a) Write a class number. Calculate the power to be raised of that number.
b) Define a class publisher that stores the name of the title and another class, sales, which
stores number of sales for three months. Derive two classes: book and tape, which inherit from
both publisher and sales. Define functions in the appropriate classes to get and print the
details.
c) Distinguish clearly between scanf() & printf() in cin & cout in C++.
(4+7+4)
8.
a) Explain operator overloading with example.
b) What is inline function? How does it differ from ordinary function? Explain merits and demerits of
it.
c) Create a class month for taking a birth date between 1 to 12 month and display it.
(5+5+5)
9.
a) Explain the difference between private, protected and public access scope with respect to the
class itself, its derived class and its object.
b) Explain the technique of type conversion from one class type to another class type with
example.
c) Explain the use of except in handling in C++ program developed. Illustrate with example.
(5+5+5)


Related Articles

More articles: DOEACC Exam Paper

Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: