Answer Posted / rohit
macro is a subroutine.
A macro is used to define a short functional code where it
can be inserted in a number of places(where the functional
code is compiled more than once)
Need of Macro: Some times there is a need to call the set
of codedata again and agian in the program.In that
particular situation we can use macros.
Use of Macro can increase the efficiency of the program and
also decrease the length of the code.
Macro can be defined by using Define statement
Example:
int a[2000];
If you use lot of places 2000 in your code
some time you want to change the 2000 to 500
then you must replace 2000 with by 500. this changes are
repeatedly by u....
In this case if you define macro
Just you change the macro it will effect over all program..
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is exit() function?
What are the advantages and disadvantages of pointers?
why wipro wase
What is operator promotion?
What is wild pointer in c with example?
How many parameters should a function have?
What are linked lists in c?
How is a pointer variable declared?
What should malloc() do?
Who is the main contributor in designing the c language after dennis ritchie?
how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?
How does placing some code lines between the comment symbol help in debugging the code?
What is #define?
Explain the concept and use of type void.
How can I prevent another program from modifying part of a file that I am modifying?