Explore topic-wise MCQs in Object Oriented Programming.

This section includes 17 Mcqs, each offering curated multiple-choice questions to sharpen your Object Oriented Programming knowledge and support exam preparation. Choose a topic below to get started.

1.

If static data member are made inline, ______________

A. Those should be initialized outside the class
B. Those can’t be initialized with the class
C. Those can be initialized within the class
D. Those can’t be used by class members
Answer» D. Those can’t be used by class members
2.

We can use the static member functions and static data member __________________

A. Even if class object is not created
B. Even if class is not defined
C. Even if class doesn’t contain any static member
D. Even if class doesn’t have complete definition
Answer» B. Even if class is not defined
3.

Which among the following can’t be used to access the members in any way?

A. Scope resolution
B. Arrow operator
C. Single colon
D. Dot operator
Answer» D. Dot operator
4.

The keyword static is used _______________

A. With declaration inside class and with definition outside the class
B. With declaration inside class and not with definition outside the class
C. With declaration and definition wherever done
D. With each call to the member function
Answer» C. With declaration and definition wherever done
5.

Which keyword should be used to declare the static member functions?

A. static
B. stat
C. const
D. common
Answer» B. stat
6.

The static member functions _______________

A. Can’t be declared const
B. Can’t be declared volatile
C. Can’t be declared const or volatile
D. Can’t be declared const, volatile or const volatile
Answer» E.
7.

Which among the following is not applicable for the static member functions?

A. Variable pointers
B. void pointers
C. this pointer
D. Function pointers
Answer» D. Function pointers
8.

Which is correct syntax to access the static member functions with class name?

A. className . functionName;
B. className -> functionName;
C. className : functionName;
D. className :: functionName;
Answer» E.
9.

The static member functions ____________________

A. Can be called using class name
B. Can be called using program name
C. Can be called directly
D. Can’t be called outside the function
Answer» B. Can be called using program name
10.

The static member functions __________________

A. Have access to all the members of a class
B. Have access to only constant members of a class
C. Have access to only the static members of a class
D. Have direct access to all other class members also
Answer» D. Have direct access to all other class members also
11.

Which among the following is correct definition for static member functions?

A. Functions created to allocate constant values to each object
B. Functions made to maintain single copy of member functions for all objects
C. Functions created to define the static members
D. Functions made to manipulate static programs
Answer» C. Functions created to define the static members
12.

THE_STATIC_MEMBER_FUNCTIONS________________?$

A. Can’t be declared const
B. Can’t be declared volatile
C. Can’t be declared const or volatile
D. Can’t be declared const, volatile or const volatile
Answer» E.
13.

The keyword static is used _______________$

A. With declaration inside class and with definition outside the class
B. With declaration inside class and not with definition outside the class
C. With declaration and definition wherever done
D. With each call to the member function
Answer» C. With declaration and definition wherever done
14.

Which_keyword_should_be_used_to_declare_the_static_member_functions?$

A. static
B. stat
C. const
D. common
Answer» B. stat
15.

The static data member _________________

A. Can be mutable
B. Can’t be mutable
C. Can’t be integer
D. Can’t be characters
Answer» C. Can‚Äö√Ñ√∂‚àö√ë‚àö¬•t be integer
16.

Which among the following can’t be used to access the members in any way?$

A. Scope resolution
B. Arrow operator
C. Single colon
D. Dot operator
Answer» D. Dot operator
17.

The static members are ______________________

A. Created with each new object
B. Created twice in a program
C. Created as many times a class is used
D. Created and initialized only once
Answer» E.