Why do C++ compilers need name mangling?

Answers were Sorted based on User's Feedback



Why do C++ compilers need name mangling?..

Answer / guest

Name mangling is the rule according to which C++ changes
function's name into function signature before passing that
function to a linker. This is how the linker differentiates
between different functions with the same name.

Is This Answer Correct ?    7 Yes 1 No

Why do C++ compilers need name mangling?..

Answer / siva

Compilers need name mangling to support/implement function
overloading.

Is This Answer Correct ?    2 Yes 0 No

Why do C++ compilers need name mangling?..

Answer / achal ubbott

It is by name mangling that a c++ compiler is able to
support function overloading.It is the way of
differentiating functions based on their name,number and
order and type of parameters. Unfortunately ISO has not set
any standard procedure for mangling names. So different c++
compiler vendors implement it in different ways.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More C++ General Interview Questions

Is c++ pass by reference or value?

0 Answers  


What is code reusability in c++?

0 Answers  


Describe the setting up of my member functions to avoid overriding by the derived class?

0 Answers  


Describe the role of the c++ in the tradeoff of safety vs. Usability?

0 Answers  


Which is not an ANSII C++ function a) sin() b) tmpnam() c) kbhit()

0 Answers  






When is a template better solution than a base class??

2 Answers   emc2,


What are vtable and vptr?

0 Answers  


Can we use resume in error handling i.e. in the catch block

5 Answers   Infosys,


What is the return value of the insertion operator?

0 Answers  


what is the behaviour of C and C++ compiler for the below statements. int *p; p = malloc(100); Is the behaviour same ? or different ?

2 Answers  


Why c++ is so important?

0 Answers  


What is general form of pure virtual function? Explain?

0 Answers  


Categories