Function overloading is a feature available in most Object Oriented Languages such as C++ and Java. But C (not Object Oriented Language) doesnt support function overloading. Function overloading can be defined as defining many functions with same name but with different signatures. This feature can be implemented in C but indirectly. To achieve this feature, have a void * type of pointer as an argument to the function and another argument telling the actual data type of the first argument that is being passed.
Function that can be defined in C:
int demo(void * arg1, int arg2);
Assume, arg2 as follows. 0 = Struct1 type variable, 1 = Struct2 type variable etc. and Struct1 and Struct2 are user defined struct types.
Above function can be called at different places as:
demo(arg1, 0); /*Here, arg1 is pointer to struct type Struct1 variable*/
demo(arg1, 1); /*Here, arg1 is pointer to struct type Struct2 variable*/
Since the second argument of the demo keeps track the data type of the first type, inside the function demo, one can get the actual data type of the first argument by typecasting it accordingly. i.e. inside the demo function.