My files are
// main.c
#include \"add.c\"
int main(void) {
int result = add(5,6);
printf(\"%d\\n\", result);
}
and
You must declare
int add(int a, int b); (note to the semicolon)
in a header file and include the file into both files.
Including it into Main.c will tell compiler how the function should be called.
Including into the second file will allow you to check that declaration is valid (compiler would complain if declaration and implementation were not matched).
Then you must compile both *.c files into one project. Details are compiler-dependent.