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. In object-oriented programming, which keyword ensures that a member variable belongs to the class itself rather than to any specific object, thereby allowing all instances to share a single copy of that variable?

  2. The condition num! = 65 cannot be replaced by

  3. Which statement is false?

  4. The three basic structure types used to write the algorithm for a program are sequence, selection and repetition. Which of the following is NOT an advantage of using only these structures when writing the algorithm for a program?

  5. Consider the following recursive Java function f that takes two long arguments and returns a float value:

    public static float f (long m, long n) {

    float result = (float)m / (float)n;

    if(m < 0 | n < 0) return 0.of;

    else result - = f(m * 2,n * 3);

    return result ;

    }

    Which of the following real values best approximates the value of f (1, 3) ?

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