InterviewSolution
| 1. |
What Is Meant By The Term Name Mangling In C++? |
|
Answer» The mangled name includes TOKENS that identify the function's return type and the types of arguments. Calls to the function and the function definition itself are recorded in the relocatable object file as REFERENCES to the mangled name, which is unique even though several functions might have the same similar name. Through name mangling, the name of the function is changed into coded and unique names or symbols which can be UNDERSTAND by the USER. In this way, the function with the same name can be DIFFERENTIATED with the help of this coded language. The mangled name includes tokens that identify the function's return type and the types of arguments. Calls to the function and the function definition itself are recorded in the relocatable object file as references to the mangled name, which is unique even though several functions might have the same similar name. Through name mangling, the name of the function is changed into coded and unique names or symbols which can be understand by the user. In this way, the function with the same name can be differentiated with the help of this coded language. |
|