Can I write a program in C or in C++ with two main functions?
If one is static and resides in a different source file I don't see any problem.
static