What are the advantages of using macro in c language?



What are the advantages of using macro in c language?..

Answer / Sukhvindar Kaur

"Macros in C provide several advantages such as they can perform simple calculations at compile-time, reduce code duplication, and increase programming efficiency. They also offer a way to define conditional compilation statements."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

How does selection sort work in c?

1 Answers  


how does the for loop work actually..suppose for the following program how it ll work plz explain to me for(i=5;i>=0;i--) prinf(i--);

19 Answers   RMSI,


how to multiply two number taking input as a string (considering sum and carry )

2 Answers   Wipro,


write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1

1 Answers  


int i; i=2; i++; if(i=4) { printf(i=4); } else { printf(i=3); } output of the program ?

15 Answers   Mascot,


a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor

1 Answers  


What is %d used for?

1 Answers  


When c language was developed?

1 Answers  


What is null pointer constant?

1 Answers  


What is the difference between #include <header file> and #include “header file”?

1 Answers  


What is the correct declaration of main?

1 Answers  


What is the stack in c?

1 Answers  


Categories