What is ambiguity in c++
Answers were Sorted based on User's Feedback
Answer / neha yadav
ambiguity means "confusion" and "two means"
ambiguity is created in data function overloading and multiple inheritance.
Is This Answer Correct ? | 41 Yes | 5 No |
Answer / h4ck3r
In multiple inheritance, there may be possibility that a class may inherit member functions with same name from two or more base classes and the derived class may not have functions with same name as those of its base classes. If the object of the derived class need to access one of the same named member function of the base classes then it result in ambiguity as it is not clear to the compiler which base’s class member function should be invoked. The ambiguity simply means the state when the compiler confused.
Is This Answer Correct ? | 19 Yes | 1 No |
Answer / philemon
ambiguity is a compile error which occurs when multiple base classes are inherited
Is This Answer Correct ? | 3 Yes | 3 No |
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.
Round up a Decimal number in c++.. example Note = 3.5 is as 4 3.3 is as 3
3 Answers Accenture, Cognizant, IBM,
What is the example of polymorphism?
What is the output of the following code: int v() { int m=0; return m++; } int main() { cout<<v(); } 1) 1 2) 0 3) Code cannot compile
What is data binding in oops?
how much classes are used in c++
c++ is a purely oop concept?
Why is static class not inherited?
what is the sylabus for priliminaries?
why freind function takes more parameter than normal member function in c++?
write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).
why oops need in programming