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

5S training documents

2981


Prepare the UGC CSIR net question papers those are enough. The question paper will be of 50 questions in size each 3 marks and with a negative of -1 for each wrong answer

2975


Explain what are db_options used for?

1852


successful command to make linux system as router in redhat-+

1897


i have got a gre score of 800 in my first attemt and a score of 1080 in the second and i have repoted both the scores.will it effect my chances of getting good university

1816


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

1805


can any one send me the configuration of cisco 1841 router????/

1837


i want a richdatatable to be displayed only when a list has some value in the bean, and a datatable with header only if the list is empty. And i want the datatable to be printed only when ajax button is clicked??

1857


nohup sort employees > list 2 > error out & what will happen?

3272


what books to prepare for atc please

1987


what is the Relationship between quantity of Gas and capacity of AC machine in tonnage.

2111


WAP in Java to print the format AMIT M I T

1970


Apply Newton?s method to compute the approximate value of root 2. Start the iteration from x0=1, and obtain two iterations.

1935


model question papers of GrayOrange company

1349


In HSE what is Lost time accident? why it is to be reported within 48 hrs to gov.authorities ?

1792