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 differnence b/w macro & functions



what is differnence b/w macro & functions..

Answer / babitha

macro: one line function;not having any return type and
argument so it would not report error even if any
misbehaves in fnction;not having return statement;
macros would be replaced by that functions/value where ever
macro name presents;if we need any later change in funcions
then modifing only at macro is neccssary, sicne it is
replacing wherever macro name presents.

functions:we would recieve error if the function call and
function prototypes are mismatch;xplicitly it should have
one return statement if the retrun type of fucntion is
aother than void;control from main function would jump to
function defintion of called fucntion if that function is
called rather than replacing the function;it may have moe
than one line function.If we want later change i fucntion
execution,then we need to modify on function prototype(if
modified),fucntion defintion and whereever that function is
called.

Is This Answer Correct ?    4 Yes 2 No

Post New Answer

More C Interview Questions

Write a code to remove duplicates in a string.

0 Answers   Expedia,


Why doesnt this code work?

0 Answers  


What is the auto keyword good for?

0 Answers  


difference of two no's with out using - operator

7 Answers  


What are derived data types in c?

0 Answers  


Explain the advantages of using macro in c language?

0 Answers  


sir, i cannot find the way how to write aprogram by using array on queue

1 Answers   IISIT,


Can you please explain the difference between malloc() and calloc() function?

0 Answers  


How is null defined in c?

0 Answers  


In which layer of the network datastructure format change is done

0 Answers   Honeywell,


Is array a primitive data type in c?

0 Answers  


Is a house a shell structure?

0 Answers  


Categories