Prior to main(), a C source file might contain:
#pragma..
#include...
#define...
typedef...
global variables
function prototypes (headers)
functions?
and probably half-a-dozen other things I've not thought of offhand.
Have I listed these elements, by and large, in the order they should
usually appear in the file? Other than defining/declaring an object before it can be referenced, what principles should be borne in mind?
Whether to put functions used in main() before or after main() is, I would guess, a matter of taste, although if they follow main() you must provide a prototype.
Thanks for any thoughts from experts.