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

find the net id and host id of the following IPV4 117.34.3.8 and 132.57.8.6

2452


when air is supplied from larger diameter pipe with some pressure if change diameter to small pipe the pressure increases or not? also what is increased pressureor velocity?

1842


reduce the number of key strokes to execute this command : t char -t -v -f/dev/fd0

3556


WAP in Java to print the format A B A B C D E D E

2097


Explain a situation in which you handled a customer?s questions or problems?

1982


Explain different parts of an instruction. What does the addressing mode bit specifies?

4559


WHAT HAPPEN WHEN ANY SPINDLE RUN OVER 10 MM HEIGHT ABOVE BOLSTAR IN RING SPINNING FRAME

1882


What is the most important thing to know about marine engineering?

2140


Tell me about your parents?? Pls share any one best words...

1774


Why the secondary ip address of interface is not advertising in IGP cloud?

4735


What would be the difficulties with building a bridge that connects the UK and Canada?

1263


what are the various technique used for inter process communication?

2222


what is the difference between public static void main (String args[]) and static public void main(String args[]) in java?

2938


PLEASE SEND ME NIC SCIENTIFIC OFFICER-2009 EXAM PATTERN AND QUESTION PAPERS

2096


I think it is 65% in 10th, 12th n BE with a 5% relaxation in any one. For west bengal bord..what will be simple average for HS...is the additional marks would be adde with 100+200=1200.and the the average will be done. OR it will be treated 65% if somebody gets 650 in HS.? Please reply for this question......... And what is the marks criteria for infosys for experienced employee.

2266