You could rename the main() method in a.c and then declare it in an external header file (a.h).

Then include that header file in b.c and just call the renamed main method. When compiling the resulting program, link all of A and B's C files together.

Slarty