Which one is better- macro or function?
Answer / Sachchidanand Shukla
The choice between macros and functions depends on the specific use case. Macros are faster as they are expanded at compile time, but they lack type safety and can lead to unintended side effects. Functions provide type safety, encapsulation, and modularity but might incur a slight performance overhead.
| Is This Answer Correct ? | 0 Yes | 0 No |
advantages and disadvantages of using Borland C++ / version 5.
What does I ++ mean in c++?
What is the purpose of decltype?
What do you mean by function and operator overloading in c++?
Explain linked list using c++ with an example?
what are Access specifiers in C++ class? What are the types?
What jobs can you get with a c++ certification?
Explain the differences between list x; & list x();.
What is a storage class used in c++?
What is the meaning of c++?
Define friend function.
When must you use a pointer rather than a reference?