thecodingidiot.com

Writing CSetup

Setup

You need GCC and a working directory. Nothing else.

Install GCC

Linux:

sudo apt update && sudo apt install gcc

WSL 2 (Windows):

Same as Linux — WSL 2 runs a real Linux kernel.

sudo apt update && sudo apt install gcc

macOS:

This chapter requires a Linux kernel. Install UTM and create an Ubuntu VM, then follow the Linux instructions above.


Verify:

gcc --version

You should see a version line. Any version from the last several years is fine.


Create a working directory

mkdir ~/f04-practice
cd ~/f04-practice

This is where you will write and compile your programs. The tester runs from here.

Move on to the next page.