Which one would you prefer - a macro or a function?



Which one would you prefer - a macro or a function?..

Answer / Deepak Kumar Sinha

A function is generally preferred over a macro as functions provide better readability, maintainability, and type safety. Macros are often used for simple operations and performance-critical code where the extra overhead of function calls can be significant.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

Explain the difference between null pointer and void pointer.

0 Answers   TCS,


Can u please send me the exam pattern and also Previous papers to javed123go@gmail.com

0 Answers  


what is the difference between 123 and 0123 in c?

1 Answers  


Write a program to reverse a given number in c?

1 Answers  


IS Doon college of Engn.. has good faculty

1 Answers  


Write a function that will take in a phone number and output all possible alphabetical combinations

1 Answers   Motorola,


we compile c program in 32 processor and 64 bit processor .exe file is created in both the processors. if we want to run .exe file in 64 bit processor which is created in 32 bit processor. is that .exe file is run or not if it is not run why?

4 Answers   HP, Wipro,


Can U write a C-program to print the size of a data type without using the sizeof() operator? Explain how it works inside ?

3 Answers   HCL, TCS,


What is the size of array float a(10)?

1 Answers  


write a program that explain #define and # undef directive

1 Answers  


What is chain pointer in c?

1 Answers  


i need all types of question paper releted to "c" and other language.

0 Answers  


Categories