Q:

What’s the difference between static, inline, and void with functions?

0

What’s the difference between static, inline, and void with functions?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Answer:

static:

static means it can’t be called from another compilation unit (source file) by name. But using function pointer forcibly you can call.

inline:

An inline keyword is a compiler directive that only suggests the compiler to substitute the body of the function at the calling the place. It is an optimization technique used by the compilers to reduce the overhead of function calls. The compiler does not inline a function if its address is taken or if it is too large to inline.

void:

void means the function does not return a value.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C++ Interview Questions and Answers(2022)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
What is function overloading in C++?... >>
<< What is the advantage and disadvantage of the inli...