CodeNFacts
C Language - Concepts, Cheatsheets & Code Examples
Introduction & Structure
How a C program is put together
C is a compiled, procedural, statically-typed language created by Dennis Ritchie in 1972 at Bell Labs. Every C program starts execution from the main() function, regardless of how many other functions exist. A program is compiled in stages: the preprocessor expands #include and #define directives first, then the compiler translates the resulting code to assembly, the assembler turns that into machine code (object files), and finally the linker combines object files and libraries into a single executable. Because C has no built-in memory safety, garbage collector, or bounds checking, the programmer is directly responsible for memory layout — this is exactly what makes C fast and close to the hardware, and also why understanding pointers and memory is non-negotiable for writing correct C.