Why do C++ compilers need name mangling?
Answers were Sorted based on User's Feedback
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 |
Answer / siva
Compilers need name mangling to support/implement function
overloading.
| Is This Answer Correct ? | 2 Yes | 0 No |
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 |
What are move semantics?
What is the type of 'this' pointer?
What is the difference between Pointer and a Reference? When you would use them?
Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.
How does work in c++?
Can we get the value of ios format flags?
Is c++ used anymore?
Read the following program carefully and write the output of the program. Explain each line of code according to given numbering. #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <errno.h> 1……………… int main (void) { pid_t pid; 2………………………… pid = fork(); 3…………………………. if (pid > 0) { int i; 4………………………… for (i = 0; i < 5; i++) { 5………………… …………… printf(" I AM VU : %d\n", i); 6………………… …………… sleep(1); } exit(0); } 7………………… ……… else if (pid == 0) { int j; for (j = 0; j < 5; j++) { 8……………………………… printf(" I have no child: %d\n", j); sleep(1); } _exit(0); } else { 9………………………………fprintf(stderr, "can't fork, error %d\n", errno); 10……………… … ………… exit (EXIT_FAILURE); } }
What is capacity in vector in c++?
C is to C++ as 1 is to a) What the heck b) 2 c) 10
What is auto used for in c++?
What is the difference between a type-specific template friend class and a general template friend class?