C++ Programming - OOPS Concepts - Discussion
Discussion Forum : OOPS Concepts - General Questions (Q.No. 20)
20.
Which of the following is correct about function overloading?
Discussion:
14 comments Page 2 of 2.
Gelu Menumorut said:
9 years ago
First, the arguments don't count here, only the parameters count.
Then, the order of the parameters doesn't count if their type is the same, so 'B' doesn't apply.
In case the types are different and their order is different, that means different parameters' types so this case is covered by 'A'.
Then, the order of the parameters doesn't count if their type is the same, so 'B' doesn't apply.
In case the types are different and their order is different, that means different parameters' types so this case is covered by 'A'.
Smarty said:
9 years ago
Please explain it with an example.
Balaji said:
8 years ago
What is meant by order of arguments?
VRushabh said:
8 years ago
int foo(int a,float b){ } and int foo(float a,int b){} are different.
This shows function arguments order difference.
This shows function arguments order difference.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers