What are the advantages and disadvantages of using inline
and const?

Answer Posted / nidhi singh

advantages of inline-no function calls need to be
generated.no stack required.
disadvantage -inline functions require more space..
the whole definition is copied.
by using const we insure the value of variable is not goin
to change..

Is This Answer Correct ?    42 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is vector pair in c++?

701


Why do we need c++?

589


Would you rather wait for quicksort, linear search, or bubble sort on a 200000 element array? (Or go to lunch...) a) Quicksort b) Linear Search c) Bubble Sort

624


What is c++ redistributable?

613


What is the best free c++ compiler for windows?

581






Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement

622


What are the stages in the development cycle?

568


What are activex and ole?

530


What do you know about near, far and huge pointer?

588


What is meaning of in c++?

663


Describe the setting up of my member functions to avoid overriding by the derived class?

601


What is pure virtual function? Or what is abstract class?

573


What is split a string in c++?

684


What are the four main data types?

573


Is rust better than c++?

590