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 are macros?what are its advantages and disadvantages in
c language?

Answer Posted / deepedra kushwaha

A macro is a name given to a block of C statements as a
pre-processor directive. Being a pre-processor, the block of
code is communicated to the compiler before entering into
the actual coding (main () function). A macro is defined
with the preprocessor directive, #define.

The advantage of using macro is the execution speed of the
program fragment. When the actual code snippet is to be
used, it can be substituted by the name of the macro. The
same block of statements, on the other hand, need to be
repeatedly hard coded as and when required.

The disadvantage of the macro is the size of the program.
The reason is, the pre-processor will replace all the macros
in the program by its real definition prior to the
compilation process of the program.
Describe the advantages of using macro.

A macro is a name given to a block of the code which can be
substituted where the code snippet is to be used for more
than once.

- The speed of the execution of the program is the major
advantage of using a macro.

- It saves a lot of time that is spent by the compiler for
invoking / calling the functions.

- It reduces the length of the program.

Is This Answer Correct ?    16 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is your Job Profile in IT feild.

2563


write program which accept information about 5 student & display same information according to ascending order of their name??

2906


can u perform addition of two octal numbers using java?

5368


DVC2000 performent: travel ??? and not output signal

1956


how to increase the chiller effiency?

2027


C++ PROGRAM FOR FIBONACCI SERIES USING COPY CONSTRUCTER

5317


Please. Does someone know how to inicialize tapes in ATL? I need have 100 tapes to init inside the ATL, how is the process to complete this request?

2070


Do you have any tips for using 3G phones?

1906


Hi All... PLease send me if anyone have "Information Security Officer" Aptitude papers. Please Mail me at mannusanghi@gmail.com

1859


How to score well in examination of MCA(engg) december 2012? please reply soon........

1814


Please explain me gsm call scenario for a prepaid roamer calling to a prepaid roamer?

2514


hi,i came to US to pursue my masters in computer information technology.Can i do my masters the first 6months in US and the rest 9 months course from INDIA through online education

1788


why view is created in database

1694


Sir, I was recently placed at ITC Infotect. My ctc is 2.46lpa. How much will I get in hand every month? Plssss answer. Thanx in advance.

2610


why not overloading -,=,_,\ operator

1958