There is no "correct answer", but I would imagine most everyone would suggest using constants: Put these in a common header file that any C file can include.
exit_codes.h
#define EXIT_SUCCESS 0
#define EXIT_GENERAL_FAILURE 1
#define EXIT_OUT_OF_MEM 2
whatever.c
#include "exit_codes.h"
void *p = malloc(100);
if (!p)
exit(EXIT_OUT_OF_MEM);