Explain the advantages of using macro in c language?
Answer / Akshay Kumar
Macros provide several advantages in C:
1. Inline replacement - Macros replace themselves with their arguments during the preprocessing phase, making them execute faster as there is no function call overhead.
2. Reduced coding - They help reduce code duplication and make the code easier to read by replacing repetitive code.
3. Efficiency - Macros can perform bitwise operations more efficiently than functions because the compiler performs these operations at compile-time.
| Is This Answer Correct ? | 0 Yes | 0 No |
write a own function to compare two strings with out using stringcomparition function?
How will you divide two numbers in a MACRO?
Does c have class?
Why c is called a mid level programming language?
What are the disadvantages of a shell structure?
how can i sort numbers from ascending order and descending order using turbo c..
Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
Write a C++ program to give the number of days in each month according to what the user entered. example: the user enters June the program must count number of days from January up to June
Are pointers integer?
Why header files are used?
What's the difference between struct x1 { ... }; and typedef struct { ... } x2; ?
1,4,8,13,21,30,36,45,54,63,73,?,?.
10 Answers AMB, Franklin Templeton,