Question: How to call a C++ function which is compiled with C++ compiler in C code?

Solution: The C++ compiler must know that f(int,char,float) is to be called by a C compiler using the extern "C"construct:

The extern "C" line tells the compiler that the external information sent to the linker should use C calling conventions and name mangling (e.g., preceded by a single underscore). Since name overloading isn't supported by C, you can't make several overloaded functions simultaneously callable by a C program.

// This is C++ code
// Declare f(int,char,float) using extern "C":
extern "C" void f(int i, char c, float x);
...
// Define f(int,char,float) in some C++ module:
void f(int i, char c, float x)
{
.....
}