sir i want to ask that :
int & ab(int & a);
int ab(int a);
int ab(int & a);
int & ab(int a);
const int ab(int a);
are all these functions also overloaded
sir i want to ask that :
int & ab(int & a);
int ab(int a);
int ab(int & a);
int & ab(int a);
const int ab(int a);
are all these functions also overloaded
Hi Bhavya, not all of these functions are overloaded. It is because overloaded methods must change the parameters list.
BUT in :
int & ab( int & a)
int ab( int & a)
is not overloaded as they have same parameter list and on compiling the compiler will raise an error.
Remeber:
Hope this helps
okey thank you
it cleared my concepts.
thanks again