English

When a member function is defined inside th.e class, then it is treated as ______ function. - Computer Science 1

Advertisements
Advertisements

Question

When a member function is defined inside th.e class, then it is treated as ______ function.

Options

  • Inline

  • outline

  • External

  • Virtual

MCQ
Fill in the Blanks
Advertisements

Solution

When a member function is defined inside the class, then it is treated as inline function.

Explanation:

  • When a member function is defined inside a class, the compiler treats it as an inline function by default.
  • An inline function replaces a function call with the function body at compile time, reducing the overhead of function calls (especially for small functions).
shaalaa.com
  Is there an error in this question or solution?
2022-2023 (March) Official

APPEARS IN

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×