All Exams Test series for 1 year @ ₹349 only
Question

In C++, a member function defined inside the class definition is implicitly treated as a/an ______ function.

The correct answer is

Inline function

In C++, a member function defined within the class definition is implicitly inline. The compiler may still decide whether to perform the actual inlining optimization. Therefore, the correct answer is Inline function.

Was this answer helpful?

Important Questions from Programming in C

  1. Consider the following C program:
    #include <stdio.h>
    int g(int n) {
    return (n+10);
    }
    int f(int n) {
    return g(n*2);
    }
    int main() {
    int sum, n;
    sum=0;
    for (n=1; n<3; n++)
    sum + = g(f(n));
    printf ("%d", sum);
    return 0;
    }
    The output of the given C program is ____________ (Answer in integer)

  2. Determine what's true for x, if we define int *x[10] ?
  3. In bitwise operator, each right shift operator divides by ________.
  4. In Switch-case, the ________ is not allowed to be case labels.
  5. In C++, ________ functions are not actually called, rather, their codes are expanded
Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App