Search Header Logo

Classes, Objects & Functions

Authored by Dr.Jeyanthi P

Information Technology (IT)

University

Used 5+ times

Classes, Objects & Functions
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following best describes function overloading in C++?

Defining functions with the same name and same parameters

Defining multiple functions with the same name but different parameter lists

Defining functions with the same name but different return types only

Using functions without return types

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is required for function overloading to occur?

Same function name but different parameter list

Different function names with same parameter list

Same function name and same parameter list

Functions having same return type

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you define a member function outside a class?

Using @ symbol

Using the scope resolution operator (::)

Using arrow operator (->)

Using dot operator (.)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to define a static data member?

const

register

static

extern

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements about static data members is true?

Each object has its own copy of static data members

Static members can only be used within constructors

Static members cannot be initialized

Static data members are shared among all objects of the class

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can a static member function be called?

Only through an object

Through an inherited class only

Using class name and scope resolution operator

Using 'this' pointer

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following cannot be accessed by a static member function?

Static data members

Global variables

Non-static data members

Static member functions

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?