Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the difference between macros and inline functions?

Answers were Sorted based on User's Feedback



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

Answer / kiran kumar yakkala

Macro- does not involve in compilation if there is any
logical error also just replaces the code
inline- look like function, but control doesn't goes to
fucntion and execute, it simply replaces the code like
macro but involves in compilation.

Is This Answer Correct ?    9 Yes 2 No

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

Answer / karna

when macro function executing the program control go to that macro function definition part
when inline function executed the definition part of function
came in inline functin call part and executed...program control not chance in any where of the program...

Is This Answer Correct ?    7 Yes 3 No

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

Answer / rahul sharma

Macro is a must do thing whearas inline is a hint to the compiler. he may choose not to inline if the function seems complex (it uses recursion or many loops)

Macro can have side effects e.g. the typical
SQUARE(++i); problem

but these problem are not there in inline functions

Is This Answer Correct ?    2 Yes 0 No

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

Answer / vishal

1> Macros are always expanded by pre-processor, whereas compiler may or may not replace the inline definitions. You cant force compiler to make a function inline. It is purely compiler based decision.

2> Debugging macros is also difficult.

3>  Expressions passed as arguments to inline functions are evaluated once. In some cases, expressions passed as arguments to macros can be evaluated more than once.

Here i got exact answer : http://www.firmcodes.com/difference-macro-inline-c/

Is This Answer Correct ?    0 Yes 0 No

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

Answer / jayapradap a

the way they are handled. Inline functions are parsed by the compiler, whereas macros are expanded by the C++ preprocesso these are The major difference between inline functions and macros

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

3. Program to print all possible substrings. ex: String S St Str Stri Strin String t tr tri trin tring r

3 Answers   Huawei,


What are Storage Classes in C ?

32 Answers   CTS, HP, IBM, Maharaja Whiteline, Tamil Nadu Open University TNOU, TATA, TCS, Wipro,


#include<stdio.h> main() { char *p1; char *p2; p1=(char *) malloc(25); p2=(char *) malloc(25); strcpy(p1,"Ramco"); strcpy(p2,"Systems"); strcat(p1,p2); printf("%s",p1); } Tell me the output?

6 Answers   Ramco,


input may any number except 1,output will always 1.. conditions only one variable should be declare,don't use operators,expressions,array,structure

4 Answers   IBM,


What are the different types of pointers used in c language?

0 Answers  


What is the most efficient way to count the number of bits which are set in a value?

4 Answers  


what is the c source code for the below output? 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1

0 Answers  


What is the difference between typeof(foo) and myFoo.GetType()?

2 Answers   Synergy,


shorting algorithmS

0 Answers   Wipro,


How to get string length of given string in c?

0 Answers  


what is develop in c language

2 Answers  


What is a string?

0 Answers  


Categories