Answers were Sorted based on User's Feedback
Answer / roshanpr
Functions that are expanded inline ( that we during there
call) is called inline functions.
Usually when there there is a function call the control is
taken to the function definition where the code is executed
and then the control returns back to main. But in case of
inline function there is no jump in the flow, rather the
function it self is expanded at the place of call.
You can make function inline in two ways.
1) Prefixing keyword "inline" durin the function
2) By defining the function inside the class declaration
Ex: shows both the implementation
inline void getAge();
void myClass getAge()
|Is This Answer Correct ?||11 Yes||1 No|
Answer / laxman
Inline function :-
In genereal function call branching method is there . In
inline function substitution takes place . Inline
functions are expanded during compilation . Exectution
becomes fast and branching is eliminated. Inline word is a
request but not command. If inline is not possible compiler
takes it like a genral function call.
1 function should be small
2. Controll statements are not valid like for ,while
if u need more mail to me
|Is This Answer Correct ?||6 Yes||2 No|
What is a pointer with example?
What do you know about near, far and huge pointer?
What do you mean by inheritance in c++? Explain its types.
How does c++ structure differ from c++ class?
Describe Trees using C++ with an example.
Do vectors start at 0?
What is the role of copy constructor in copying of thrown objects?
what is meaning of isa and hsa
Write a C++ program that asks the user to choose a number between 1 and 1000. Then, your program should be able to guess the number by asking the user no more than 10 yes/no questions. Use a while loop in your program
What is the difference between c++ and turbo c++?
What is constant in c++ with example?
Can we get the value of ios format flags?