🧪 OOPS MCQ Quiz Hub

OOPS Mcq Question Set 3

Choose a topic to test your knowledge and improve your OOPS skills

How is it possible to have both const and non-const version of a function?





✅ Correct Answer: 3

When both the const and non-const version of functions are required?





✅ Correct Answer: 1

If a function is to be made const, which is the correct syntax?





✅ Correct Answer: 2

Functions which differ in const-ness are considered _________





✅ Correct Answer: 2

If const version of a function when overloading is used, the function ______





✅ Correct Answer: 4

Which among the following is recommended for const functions?





✅ Correct Answer: 2

Use of const member function in a program ______





✅ Correct Answer: 2

How many types of member functions are possible in general?





✅ Correct Answer: 4

Simple member functions are ________





✅ Correct Answer: 1

What are static member functions?





✅ Correct Answer: 4

How can static member function can be accessed directly in main() function?





✅ Correct Answer: 3

Correct syntax to access the static member functions from the main() function is _______





✅ Correct Answer: 2

What are const member functions?





✅ Correct Answer: 3

Which among the following best describes the inline member functions?





✅ Correct Answer: 4

What are friend member functions (C++)?





✅ Correct Answer: 4

What is the syntax of a const member function?





✅ Correct Answer: 1

Which keyword is used to make a nonmember function as friend function of a class?





✅ Correct Answer: 3

Member functions ______





✅ Correct Answer: 3

All type of member functions can’t be used inside a single class.





✅ Correct Answer: 2

Which among the following is true?





✅ Correct Answer: 4

Which keyword is used to define the static member functions?





✅ Correct Answer: 1

Which keyword is used to define the inline member function?





✅ Correct Answer: 2

Which among the following best describes member functions?





✅ Correct Answer: 2

How many types of member functions are generally there in C++?





✅ Correct Answer: 4

How can a static member function be called in the main function?





✅ Correct Answer: 4

What are inline member functions?





✅ Correct Answer: 2

How to access members of the class inside a member function?





✅ Correct Answer: 4

For overloading “( )”, “[ ]” or “->” operators, a class _____





✅ Correct Answer: 3

If a virtual member function is defined _________





✅ Correct Answer: 1

Member functions of a generic class are ______





✅ Correct Answer: 2

Member function of a class can ______





✅ Correct Answer: 1

Which among the following is proper syntax for class given below? class A { int a,b; public : void disp(); }





✅ Correct Answer: 2

A member function can _____ of the same class.





✅ Correct Answer: 1

Which member function doesn’t require any return type?





✅ Correct Answer: 4

Which among the following is not possible for member function?





✅ Correct Answer: 3

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





✅ Correct Answer: 2

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





✅ Correct Answer: 4

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





✅ Correct Answer: 3

Which among the following is true?





✅ Correct Answer: 2

The static members are _______





✅ Correct Answer: 4

Which among the following is true?





✅ Correct Answer: 2

The static member functions ______





✅ Correct Answer: 4

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





✅ Correct Answer: 1

The keyword static is used ______





✅ Correct Answer: 2

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





✅ Correct Answer: 3

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





✅ Correct Answer: 1

The static data member ________





✅ Correct Answer: 2

If static data member are made inline, ______





✅ Correct Answer: 3

Which among the following best describes member function overriding?





✅ Correct Answer: 1

Which among the following is true?





✅ Correct Answer: 3