What happens when you type gcc main.c

  • Second: it includes code from header and source file
  • Third: it replaces macros (if there are any that are used in the program) with code.
  • -S that generates the assembly code of a C code and saves it in an output file (by default its the same name of the file but with extension .s)
  • -c that compiles a C file but does not link and saves it in an output file(by default its the same name of the file but with extension .o, also called object file)

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store