DEV Community

Abhinav Dogra
Abhinav Dogra

Posted on

Answer: How to split a C program into multiple files?

In general, you should define the functions in the two separate .c files (say, A.c and B.c), and put their prototypes in the corresponding headers (A.h, B.h, remember the include guards).

Whenever in a .c file you need to use the functions defined in another…

Top comments (0)