Will the inline function be compiled as the inline function always? Justify.
Answer / atul shankhwar
An inline function is a request and not a command. Hence it won't be compiled as an inline function always.
Explanation:
Inline-expansion could fail if the inline function contains loops, the address of an inline function is used, or an inline function is called in a complex expression. The rules for inlining are compiler dependent.
| Is This Answer Correct ? | 1 Yes | 1 No |
How do you generate a random number in c++?
How do pointers work?
What are the differences between public, private, and protected access?
12 Answers IBM, Oracle, Wipro,
Define pre-condition and post-condition to a member function in c++?
What is a wchar_t in c++?
Define pure virtual function?
class X { private: int a; protected: X(){cout<<"X constructor was called"<<endl;} ~X(){cout<<"X destructor was called"<<endl} }; Referring to the code above, which one of the following statements regarding "X" is TRUE? a) X is an abstract class. b) Only subclasses of X may create X objects. c) Instances of X cannot be created. d) X objects can only be created using the default copy constructor. e) Only friends can create instances of X objects.
What does the linker do?
Please explain the reference variable in c++?
How to avoid a class from instantiation?
What do you mean by call by value and call by reference?
What is the function to call to turn an ascii string into a long?