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 the role of this pointer?
What is LINKED LIST? How can you access the last element in a linked list?
Why do we need functions in c?
What is the use of function overloading in C?
Why static variable is used in c?
How do I round numbers?
I just typed in this program, and it is acting strangely. Can you see anything wrong with it?
What is a program?
Suggesting that there can be 62 seconds in a minute?
Why can’t we compare structures?
Is c call by value?
What are reserved words with a programming language?
Is it possible to use curly brackets ({}) to enclose single line code in c program?
List some basic data types in c?
why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above