Compiling and Running C

Simply put, a compiler does the critical task of taking your C source code and turning it into an executable program (one that can be run). It takes high-level instructions and generates the proper low-level machine code that the computer can understand.

This process—also called building—involves linking together all relevant source files, reporting on errors, and much more. Most important, compilers take generic, possibly operating system–indifferent, C code and creates an executable file for that particular platform.

There are two ways you can compile and run your C:

  • By using a command-line prompt with a stand-alone compiler

  • By using the compiler and features built into an IDE

In the following steps, you will see how ...

Get C Programming: Visual Quickstart Guide now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.