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 |
What is a constant reference?
What are structs in c++?
Which uses less memory? a) struct astruct { int x; float y; int v; }; b) union aunion { int x; float v; }; c) char array[10];
What is #include math h in c++?
What is null and void pointer?
How can we access protected and private members of a class?
how to swap two numbers with out using temp variable
12 Answers Global eProcure, TCS,
What header file is needed for exit(); a) stdlib.h b) conio.h c) dos.h
What is dynamic and static typing?
class X { public: int x; static void f(int z); }; void X::f(int y) {x=y;} What is the error in the sample code above? a) The class X does not have any protected members. b) The static member function f() accesses the non-static z. c) The static member function f() accesses the non-static x. d) The member function f() must return a value. e) The class X does not have any private members.
What are the advantages of prototyping?
If I is an integer variable, which is faster ++i or i++?