What is macro?
Answers were Sorted based on User's Feedback
Answer / jayasrinivas.donavalli
macro is a subroutine.
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
| Is This Answer Correct ? | 8 Yes | 0 No |
Answer / nagendranath.s
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)
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / kesar
Macro is define by user
it locks the lot modifications....
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 |
Answer / 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 |
Write a program to remove the C comments(/* */) and C++ comments(//) from a file. The file should be declared in command line.
How to find the digits truncation when assigning the interger variable to the character variables. like int i=500; char x = i : here we have truncation. how to find this. another ex: i =100; char x=i. here we do not have truncation.
GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)
What is volatile variable in c?
what is data structure?
Why doesn't the code "a[i] = i++;" work?
Explain how can I convert a string to a number?
for(i=1;i>0;i++); printf("i=%d",i); what will be the answer????
What are the difference between a free-standing and a hosted environment?
Wt are the Buses in C Language
What is wrong with this program statement?
Explain in detail how strset (string handling function works )pls explain it with an example.