C++ Access Control Question:
Download Questions PDF

Inline functions may not work ______.

1. If function contain static variables
2. If function contain global and register variables
3. If function returning value consists looping construct(i.e. for, while)
4. If inline functions are recursive
5. If function contains const value

a. Only 1,4,5
b. Only 2,3,5
c. Only 1,3,4
d. All of these

Answer:

c. Only 1,3,4

Download C++ Access Control Interview Questions And Answers PDF

Previous QuestionNext Question
By default, if a function with minimum lines of code is declared and defined inside the class becomes Inline function.

a. True
b. False
Default values for a function are specified when____

a. function is defined
b. function is declared
c. Both a and b
d. None of these