Embedded Software Engineer Question:

Download Job Interview Questions and Answers PDF

Tell me what happens when recursive functions are declared inline?

Embedded Software Engineer Interview Question
Embedded Software Engineer Interview Question

Answer:

Inlining an recursive function reduces the overhead of saving context on stack. But, inline is merely a suggestion to the compiler and it does not guarantee that a function will be inlined. Obviously, the compiler won't be able to inline a recursive function infinitely. It may not inline it at all or it may inline it, just a few levels deep.

Download Embedded Software Engineer Interview Questions And Answers PDF

Previous QuestionNext Question
Please explain what is semaphore?Tell me what is difference between binary semaphore and mutex?