Why use C instead of C++ for APIs?
How can we exchange objects and functions between programs written in different languages or compiled with different compilers?
We must make sure that we express them in such a way that these objects and functions are universally understood - so that both the client and the server can send and receive the information.
C unlike C++ has a very simple way of exposing it’s functions by name without name mangling, ignoring other information like parameter type or return values.
C is compiled in a standardized way which makes it the lingua franca to communicate with between languages.