Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews C Plus Plus Language Interviews:C++ Access ControlC++ COM ActiveXC++ ConstructorsC++ ContainersC++ Exception HandlingC++ FriendC++ InheritanceC++ Inline FunctionC++ New And DeleteC++ Operator OverloadingC++ Pointers & FunctionsC++ ProgrammerC++ ReferencesC++ Static DataC++ SyntaxC++ TemplateC++ Type CheckingC++ Virtual Functions
Copyright © 2018. All Rights Reserved
C++ Inline Function Interview Question:
Can you please explain the difference between inline functions and macros?
Submitted by: AdministratorA macro is a fragment of code which has been given a name. Whenever the name is used, it is replaced by the contents of the macro. There are two kinds of macros: Object-like macros and function-like macros.
Inline function is a function that is expanded in line when the function is called. That is the compiler replaces the function call with the function code (similar to macros).
The disadvantage of using macros is that the usual error checking does not occur during compilation..
Submitted by: Administrator
Inline function is a function that is expanded in line when the function is called. That is the compiler replaces the function call with the function code (similar to macros).
The disadvantage of using macros is that the usual error checking does not occur during compilation..
Submitted by: Administrator
Copyright 2007-2025 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.