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

What is Memory Alignment?

2 Answers   TCS,


Why do we use string in c++?

1 Answers  


Is java based off c++?

1 Answers  


Specify some guidelines that should be followed while overloading operators?

1 Answers  


What do you mean by pure virtual functions in C++? Give an example?

1 Answers  


Why do we use structure in c++?

1 Answers  


What are default parameters? How are they evaluated in c++ function?

1 Answers  


What does asterisk mean in c++?

1 Answers  


Is it possible for the objects to read and write themselves?

1 Answers  


What are the difference between reference variables and pointers in C++?

1 Answers  


What is abstract class in c++?

1 Answers  


Write a program to find the Fibonacci series recursively.

1 Answers   Huawei,


Categories