What is the disadvantage of using a macro?



What is the disadvantage of using a macro?..

Answer / Sachin Narang

One major disadvantage of using macros in C++ is that they can lead to unintended side effects due to textual substitution, making code harder to understand and debug. Additionally, macros can cause issues with type safety and performance.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is #include sstream?

1 Answers  


what is the use of void main() in C++ language?

1 Answers  


Implement a 2 dimensional array by one dimentional array

1 Answers   CTS,


What is operators in c++?

1 Answers  


What are arrays c++?

1 Answers  


const char * char * const What is the differnce between the above two?

11 Answers   TCS,


what is data abstraction in C++?

1 Answers  


What is friend class in c++ with example?

1 Answers  


How do pointers work?

1 Answers  


What does int * mean in c++?

1 Answers  


What new()is different from malloc()?

1 Answers  


What are friend functions in C++?

1 Answers   BlackRock,


Categories