You are on page 1of 4

OOP MCQs

1) ……….. Identify the characteristics as fundamental to OOP.


a) John smith (1993)
b) Tom Holland (1994)
c) Alan Kay (1993)
d) Alan Turing (1996)
2) “Formal syntax cannot be express semantics fully”, is said by:
a) Alan Kay
b) Alan Turing
c) Robert Rosen
d) Bjarne Stroustrup
3) C++ language is shipped with a lot of functions which are known as…………..
a) User defined functions
b) Well defined functions
c) Standard functions
d) All of above
4) Character manipulation functions are declared in……….
a) <char.h>
b) <chty.h>
c) <chtype.h>
d) <ctype.h>
5) C++ is shipped with more than ………. standard languages.
a) 50 b) 30 c) 70 d)100
6) Generally speaking we define a C++ function in two steps.
a) Preferably and mandatory
b) Mandatory
c) Preferably but not mandatory
d) None of these
7) The function header has the following syntax……….
a) <header> <name> (<parameter list>)
b) <header>(<name>)
c) <name> <header> <parameter list>
d) <header> <parameter list>
8) Sometimes, we use the keyword ………….to define user defined functions.
a) Build in
b) USD
c) Inline
d) All of above
9) Which of the following is bad practice to share data amount different functions?
a) Using declared variable
b) Using local variable
c) Using global variable
d) None of these
10) If a function defines a local variable and there was a global variable with the same name,
the function uses its ………….
a) Local variable
b) Global variable
c) Use both one by one
d) Do not run the program
11) Once the value parameter arguments accepted copies to the corresponding arguments
data they act as
a) Local variable
b) Global variable
c) Declared variable
d) User defined variable
12) What is the programming style of the object oriented conceptual model?
a) Invariant relationships
b) Algorithm
c) Classes and objects
d) Goals often expressed in a predicate calculus
13) A good problem is …….. related to real life problem.
a) Not
b) Closely
c) Openly
d) Loosely
14) Data item in a class must be……….
a) Private
b) Public
c) Declare in main
d) None of these
15) Which of the following is an abstract data type?
a) Class
b) Int
c) String
d) Double
16) If you want to write multiple functions in a class with same name, then what C++ feature
will you see?
a) Function overloading
b) Function overriding
c) Abstraction
d) Encapsulation
17) In C++ code, variable can be passed to a function by…….
a) Pass by value
b) Pass by pointers
c) Pass by reference
d) All
18) By default functions available in C++ language are……….
a) Constructor
b) Destructor
c) Assignment operator
d) All of these
19) Data member and member functions of a class in C++ program are by default…….
a) Protected
b) Public
c) Private
d) None of these
20) In C++ programming cout is a / an ………….
a) Function
b) Operator
c) Object
d) Macro
ANSWERS:
1) Alan kay (1993)
2) Alan turing
3) Standard functions
4) <ctype.h>
5) 100
6) Preferably but not mandatory
7) <header> <name> (<parameter list>)
8) Inline
9) Using global variable
10) Local variable
11) Local variable
12) Classes and objects
13) Closely
14) Private
15) Class
16) Function overloading
17) All
18) All of these
19) Private
20) Object

You might also like