Multiple choice java

During Compilation, The function call is replaced by function code for which function?

  1. Virtual functions

  2. Inline functions

  3. Static functions

  4. Friend functions

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Inline functions are expanded at compile time - the function call is replaced by the actual function code, eliminating function call overhead. This is a compiler optimization that trades code size for execution speed. Virtual functions use dynamic dispatch, static functions have file scope, and friend functions access private data - none of these replace the call with code at compile time.