Are you learning the C programming language? Would you like to configure a development environment on your own machine?
You will need two things to create a C program: a text editor to write the source code for the program and a compiler to convert the source code into an executable file so the program can be run. This document describes how to compile and run simple C programs (console-based programs that deal with text-based input and output) on either the Windows or Mac OS platforms. In both cases, you can choose whether to compile and execute your programs from a command line environment (the Developer Command Prompt on Windows or the Terminal window on Mac OS), or a graphical integrated development environment (Visual Studio Community on Windows or Visual Studio Code on Mac OS).
![]() |
![]() |
![]() |
![]() |
Installing VS Community and writing "Hello world" |
Writing a very simple "Hello world" program in C |
A Fahrenheit to Celsius conversion program in C |
Creating a project in Visual Studio |
![]() |
![]() |
![]() |
Compiling a C program with the Visual Studio Command Prompt |
Creating a project using Visual Studio |
Switching source files in a Visual Studio Project |
If you have feedback or corrections, please contact Dr Paul Denny (paul@cs.auckland.ac.nz).