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

what is the significance of static storage class specifier?

0 Answers  


What are the advantages of using macro in c language?

0 Answers  


What are the types of operators in c?

0 Answers  


What is the difference between procedural and functional programming?

0 Answers  


Define function ?Explain about arguments?

2 Answers   Geometric Software, Infosys,


Is c still used?

0 Answers  


How do I read the arrow keys? What about function keys?

0 Answers  


Is the exit() function same as the return statement? Explain.

0 Answers   Agilent, ZS Associates,


Write a c program to read a positive number and display it in words.? ex: 123=one two three help me....

2 Answers  


main() { char *p; p="Hello"; printf("%c\n",*&*p); }

2 Answers   ME,


Draw a flowchart to produce a printed list of all the students over the age of 20 in a class .The input records contains the name and age of students. Assume a sentinel value of 99 for the age field of the trailer record

0 Answers   Wipro,


Are comments included during the compilation stage and placed in the EXE file as well?

0 Answers  


Categories