cpp model question paper

4
B.C.A Degree Examination Model question paper Third semester B C A 2010-11 Object Oriented Programming and C++ Time : 3 hours I. A. Answer all questions Weight 1 1. ________________ is an object or set of object that communicates directly with the system but that is not part of the system a. Actor b. Activity c. Scenarios d. none of these 2. The manipulator <<endl is equivalent to a. ‘ \t ’ b. ‘ \n ‘ c. ‘ \v ‘ d. none of the above. 3. The member of a class are default a. Private b. Protected c. Public d. Static 4. Constructor is executed when a. Object goes out of scope b. object is destroyed c. both (a) and (b) d. none of the above B. Answer all questions Weight 1 5. Which of the following operator cannot be overloaded b. dot operator(.) b. plus operator(+) c. & operator d. - - operator 6. A, B and C are objects of same class. To execute the statement C=A+B, the operator must be overloaded a. + b. = c. both (a) and(b) d. none of the above 7. An object a cannot access the variable

Upload: raja-guru

Post on 22-Nov-2014

389 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Cpp Model Question Paper

B.C.A Degree Examination

Model question paper

Third semester B C A 2010-11

Object Oriented Programming and C++

Time : 3 hours

I. A. Answer all questions Weight 1

1. ________________ is an object or set of object that communicates directly with the system but that is not part of the system

a. Actor b. Activity c. Scenarios d. none of these

2. The manipulator <<endl is equivalent to

a. ‘ \t ’ b. ‘ \n ‘ c. ‘ \v ‘ d. none of the above.

3. The member of a class are default

a. Private b. Protected c. Public d. Static

4. Constructor is executed when

a. Object goes out of scope b. object is destroyed

c. both (a) and (b) d. none of the above

B. Answer all questions Weight 1

5. Which of the following operator cannot be overloaded

b. dot operator(.) b. plus operator(+)

c. & operator d. - - operator

6. A, B and C are objects of same class. To execute the statement C=A+B, the operator must be overloaded

a. + b. = c. both (a) and(b) d. none of the above

7. An object a cannot access the variable

Page 2: Cpp Model Question Paper

class A

{ public:

int a;

private:

int b;

public:

A( ) { a=10, b=20;}

};

void main( )

{ A a;}

a. b b. a c. both (a) and (b) d. both a and b are accessible

8. The protected keyword allows

a. derived class to access base class members directly

b. prevent direct access to public members

c. allows object to access private members

d. all of the above

C. Answer all questions Weight 1

9. the ambiguity of members normally occurs in

a. single inheritance b. multilevel inheritance

c. multiple inheritance d. none of the above

10. The object itself is

a. pointer b. variable c. class member d. operator

11. The dynamic object are created

a. at run-time b. compile time c. both (a) and (b)

d. none of the above

Page 3: Cpp Model Question Paper

12. Dynamic binding is done using the keyword

a. Static b. inline c. virtual d. void

D. Answer all questions Weight 1

13.A ______________ is an abstraction of the values and links of an object.

14. ____________ means the ability that one thing can take several distinct forms.

15. The key word _____________is used to overload an operator.

16. __________ is a way to add feature to existing class without rewriting.

II. Write short answers on ANY Five of the following Weight 1 each

17. Explain class diagram

18. What is mean by change event ? explain

19. What is Inline function

20. What is parameterized constructor?

21. Hybrid inheritance explains.

22. Explain Abstract classes

23. What is pure virtual function

24. Explain this pointer

III Write short essays on ANY FOUR of the following Weight 2 each

25.Explain different Object Oriented Themes

26.Explain use case with example

27. What is difference between call by reference and return by reference

28. What is member function? How it is differ from constructor

Page 4: Cpp Model Question Paper

29.Write a program to declare three classes. Declare integer array as data member in each class. Perform addition of two data member array into array of third class. Use common functions and friend function.

30.What are the different string manipulators in C++? explain

IV Write essays on ANY TWO Weight 4 each

31.What is interaction modeling? explain each levels of abstraction in interaction modeling in detail with examples

32. What is function overloading? Write a class “vector”(series of float values). Include constructor, and member functions to create and display the vectors. Also add two vectors, and multiply vector by scalar values by operator overloading.

33.Explain :- virtual base class, dynamic constructor, different type conversions, nesting of class.