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

Why preincrement operator is faster than postincrement?

5 Answers  


Implement strcmp

3 Answers   Bloomberg, Citadel,


What are the four main data types?

0 Answers  


What is the meaning of string in c++?

0 Answers  


What are structs in c++?

0 Answers  






Which of the following is evaluated first: a) && b) || c) !

0 Answers  


Differentiate between an inspector and a mutator ?

0 Answers  


What is class definition in c++ ?

0 Answers  


How do you flush std cout?

0 Answers  


What is exception handling? Does c++ support exception handling?

0 Answers  


Explain the difference between overloading and overriding?

0 Answers  


Which should be more useful: the protected and public virtuals?

0 Answers  


Categories