C has unique names for functions

  • C is not an Object-Oriented Programming Language

  • That means:

      • No function overloading.

        I.e.: functions in C are uniquely identified by their function name only !!!!

     

     

Example that shows C does not have overloaded functions

/* -------------------------------
   First definition of function f
   ------------------------------- */
int f( int x )       // definition 1
{
   return(x * x );
}

/* ------------------------------------------
   Overloading the function f !!!
   ------------------------------------------ */             
float f( float x )    // definition 2
{
   return(x * x );
}

int main(int argc, char *argv[] )
{

} 

DEMO: demo/C/set1/overload1.c
error: conflicting types for `f'