How does a C program get started?
Eventually it is operating system. Usually there is some medium between real entry point and main function, this is inserted by compiler linker.
Some details (related to Windows): There is header in PE file called IMAGE_OPTIONAL_HEADER
which has the field AddressOfEntryPoint
, which is in turn address of the first code byte in the file that will be executed.