What is the difference between inline functions and macros?

Answers were Sorted based on User's Feedback



What is the difference between inline functions and macros?..

Answer / nashiinformaticssolutions

• Inline Functions: Type-checked, replace function calls with code during compilation.
• Macros: Preprocessor directive, no type-checking.

Is This Answer Correct ?    0 Yes 0 No

What is the difference between inline functions and macros?..

Answer / nashiinformaticssolutions

1. Macros: Text substitution; no type checking.
2. Inline functions: Replaced at runtime; provide type checking and debugging benefits.

Is This Answer Correct ?    0 Yes 0 No

What is the difference between inline functions and macros?..

Answer / glibwaresoftsolutions

1. Macros: Text substitution; no type checking.
2. Inline functions: Replaced at runtime; provide type checking and debugging benefits.

Is This Answer Correct ?    0 Yes 0 No

What is the difference between inline functions and macros?..

Answer / glibwaresoftsolutions

• Inline Functions: Type-checked, replace function calls with code during compilation.
• Macros: Preprocessor directive, no type-checking.

Is This Answer Correct ?    0 Yes 0 No

What is the difference between inline functions and macros?..

Answer / hr@tgksolutions.com

• Inline Functions: Type-checked, replace function calls with code during compilation.
• Macros: Preprocessor directive, no type-checking.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What happens when the extern "c" char func (char*,waste) executes?

0 Answers  


Are vectors passed by reference c++?

0 Answers  


Specify different types of decision control statements?

0 Answers  


whats the size of class EXP on 32 bit processor? class EXP { char c1; char c2; int i1; int i2; char *ptr; static int mem; };

5 Answers   Huawei,


Explain the difference between c & c++?

0 Answers  


What do you mean by function overriding & function overloading in c++?

0 Answers  


Is vector a class in c++?

0 Answers  


Can a constructor throw a exception? How to handle the error when the constructor fails?

1 Answers  


Define copy constructor.

0 Answers  


In a class only declaration of the function is there but defintion is not there then what is that function?

5 Answers   Hughes,


reading material is provided 3 books for c++ if u need more do let me know thnx i hve lots of material do let me know if u want it

2 Answers  


What is the meaning of c++?

0 Answers  


Categories