Ace Your C++ Skills 2025 – Rock the ‘Thinking in C++’ Challenge!

Question: 1 / 565

In what situation is an inline function expanded?

During run time.

During linking.

At the location of the function call.

A) An inline function is expanded at the location of the function call, therefore option A is incorrect.

B) An inline function is expanded at the location of the function call, therefore option B is incorrect.

D) An inline function is expanded at the location of the function call, therefore option D is incorrect.

Explanation

An inline function is expanded at the location of the function call, which is the correct answer. This means that the code of the inline function is inserted directly at the location where the function is called, saving the time and memory required to perform a regular function call. Options A and B are incorrect because an inline function is expanded at a compile-time, not runtime or linking. Option D is incorrect because the expansion of an inline function happens before the execution of the program, not after. Therefore, the only correct option is option C, which states that the

Get further explanation with Examzify DeepDiveBeta

After the program execution.

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy