I do not know what "linking" is. Well, I know it links source files, but how is this done?
I do not know what "linking" is. Well, I know it links source files, but how is this done?
The compiler turns your source files into object files. For small programs, this will be a single file, but for large projects there will be many source files, not necessarily compiled at the same time.
The linker takes all your object files, combines them with the runtime library (the bit which estabishes an environment which results in main() being called), and also searches additional libraries for library routines which you may have used in your code.
If you're using gcc, then the -v command line option shows all the intermediate steps of pre-processor, compile, assemble, link
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.