Translation Unit in C

Example

Snippet 1:

File: print.exe

#include <stdio.h>

void print_exe() {
    printf("print-exe\n");
}

File: main.c

#include "print.exe"
#include <stdio.h>

int main() {
    printf("print-main\n");
    print_exe();
    return 0;
}

Compile:

gcc main.c -o main.exe
./main.exe

Snippet 1 stdout:

print-main
print-exe

References

/c/