Question Bank – MCQs BCA-203 Object-oriented Programming ...

156 downloads 605 Views 15KB Size Report
Question Bank – MCQs. BCA-203 Object-oriented Programming using C++. 1. UNIT – 1 (OOP Concepts and Introduction to C++). 1 In structured programming,  ...
Question Bank – MCQs BCA-203 Object-oriented Programming using C++ 1. UNIT – 1 (OOP Concepts and Introduction to C++) 1 In structured programming, the problem is divided into various ______. (A) modules (B) functions (C) structures (D) objects 2 In Object-oriented programming, the problem is divided into _____. (A) classes & objects (B) functions (C) structures (D) modules 3 A class is ____ datatype. (A) primitive (B) derived (C) user-defined (D) All of these 4 A class is a collection of ____ and _____. (A) data-members & member functions (B) data-members, member functions and main() (C) data-members, member functions, (D) None of these main() and include statements 5 An object is …… (A) a variable of class datatype. (B) same as a class. (C) just like a global variable. (D) collection of data-members and member functions. 6 Wrapping up of data & functions together in a class is known as _____. (A) Overloading (B) Data Abstraction (C) Polymorphism (D) Encapsulation 7 Including only necessary details and ignoring additional details while defining a class is known as ____. (A) Overloading (B) Data Abstraction (C) Polymorphism (D) Encapsulation 8 Preventing direct access of data-members of the class from outside world is known as ____. (A) Polymorphism (B) Encapsulation (C) Data Hiding. (D) scope resolution. 9 What are cin and cout? (A) pointers (B) functions (C) operator (D) stream objects 1 Which header file must be included for cin and cout? 0 (A) stdio.h (B) conio.h (C) iostream.h (D) Both iostream.h and conio.h 1 Creating a new class using one or more existing classes is known as ____. 1 (A) Polymorphism (B) Encapsulation (C) overloading (D) inheritance 1 Ability of an operator or function call to take different forms is known as ____. 2 (A) Polymorphism (B) Encapsulation (C) overloading (D) inheritance Answers

1–B 7–B

2–A 8–C

3–C 9–C

4–A 10 – C

5–A 11 – D

6–D 12 - A

UNIT – 2 (Control Flow Constructs, Input /Output and Arrays) 1

2

3

4

5

6

7

8

9

10

11

12

Which of the following can replace a simple if-else construct? (A) Ternary operator (B) while loop (C) do-while loop (D) for loop Which of the following is an entry-controlled loop? (A) do-while loop (B) while loop (C) for loop (D) Both (B) and (C) Which of the following is most suitable for a menu-driven program? (A) do-while loop (B) while loop (C) for loop (D) All of these Consider the following loop : for(int i=0; i