You are on page 1of 2

C.

Class object
1. Object oriented D. Reference varable
programming approach • Which of the following
focus on
property is true for static function.
a. Function
A. It can be called using
b. Data
class name
c. Both
B. It access all the members of
d. None of the above
its class
1. The first parent class is also
C. It is called anywhere in the
called
class.
a. Ancestor class
D. It cannot access static data
b. Base class
members.
c. Super class
d. All of above. • in switch statement the
2. A goto statement transfer expression
control to A. Can be of any type
1. label B. Can be integer or character
2. A variable type
3. Function C. Cannot be floating type.
4. operator D. Both B & C
• Iostream.h is • …….. Variables are
1. Header file initialized to zero.
2. Preprocessor directive A. auto
3. Both A & B B. static
4. User defined fucntion C. register
D. all
• In C++ cout and cin are
• objects
• Maximum number of values
that can be returned from
• class function.
• Function A. 0
B. 1
• Command C. 2
• << is called D. any
 Insertion operator • Lifetime of extern variable is
 Extraction operator A. function
 Object B. file
 function C. block
• >>is called D. None
 Insertion operator • Array is collection of
 Extraction operator A. Integer data items.
 Object B. Similar data items
 function C. Dissimilar data items
• C++ developed by D. Built in data type
A. Donald Knuth • The NULL character is
B. Bjarne Stroustrup represented by.
C. Ken Thompson A. \0
D. Deniss Ritchie B. /0
• Function prototype is also C. \o(char)
called D. 0
A. Function call • struct is
B. Function A. An identifier
declaration B. Keyword
C. Function definition C. User defined data type
D. Return type D. Constant
• Which of the following not • While accessing data
passed to the function members left side of the dot
A. Header file operator
B. Array A. Class name
B. Object name D. Any no of definitions .
C. Data member • Copy constructor need
D. Program name
A. reference of object as
• Which function access the argument
private data members of a class. B. Object as argument
A. Public member function C. Data members
B. Private member function D. Reference of data members
C. Friend function • We cannot pass parameter
D. All of above
to
• Private access mode A. Default argument
implements constructor
A. Encapsulation B. destructor
B. Data hiding C. Dynamic constructor
C. Data abstraction D. Copy constructor
D. Polymorphism • Destructor may be -------
• By default all member of a A. Parameterized
class B. virtual
A. public C. Overloaded
B. private D. Friend
C. Protected • ----- Parameters are
D. all
required when unary operator
• Friend function can be overloaded by friend function.
defined in A. 0
A. Public access mode B. 1
B. Private access mode C. 2
C. Protected access mode D. 5
D. Any of the above • ------- can be overloaded
• Which of the following is A. []
access specifier B. Sizeof
A. Auto C. ?:
B. friend D. .*
C. public • ------- cannot be overloaded
D. inline
A..*
• Which of the following B.New
cannot access by the outside the C.>=
world D.+
A. Private members  The conversion from
B. Public members basic to class type is
C. Protected members done
D. A & C A. constructor
• A constructor is invoked B. Destructor
C. Operator
automatically when
D. Friend function
A. Object is initialized
A friend function cannot be used
B. object is created
to overload
C. Object goes out of scope
A. +
D. Anytime
B. <=
• A destructor is invoked C. >=
automatically when D. =
A. Object is initialized
B. object is created
C. Object goes out of scope
D. Anytime
• A class contain
----definitions for destructor
A. 2
B. 1
C. 4

You might also like