In C++, if two overloaded functions have the same signature but differ in const qualification, it leads to ________.
- Ambiguity Error
- Compilation Error
- Linker Error
- Undefined Behavior
When two overloaded functions in C++ have the same signature but differ in const qualification, it leads to undefined behavior. The compiler cannot determine which function to call, resulting in ambiguous code. It's essential to avoid such situations for code clarity and reliability.
Loading...
Related Quiz
- How does a double pointer differ from a single pointer?
- What is the scope of a local variable defined inside a function in C?
- In C, which function can be used to search for a substring within a string?
- You're debugging a segmentation fault in a program and find that a pointer is being accessed after it has been freed. What is this type of pointer error called?
- The function ________ is used to write data to a binary file.