Sample Video Frame

Created by Zed A. Shaw Updated 2026-08-31 20:32:57
 

Exercise 1: Dust Off That Compiler

2024 Note: I mention a "PDF" in the video but that's not available anymore. Also, your error output might be different as compilers may have improved their error detection.

After you have everything installed, you need to confirm that your compiler works. The easiest way to do that is to write a C program. Since you should already know at least one programming language, I believe you can start with a small but extensive example.

View Source file ex1.c Only

#include <stdio.h>

/* This is a comment. */
int main(int argc, char *argv[])
{
    int distance = 100;

    // this is also a comment
    printf("You are %d miles away.\n", distance);

    return 0;
}

If you have problems getting the code up and running, watch the video for this exercise to see me do it first.

Previous Lesson Next Lesson

Register for Learn C the Hard Way

Register today for the course and get the all currently available videos and lessons, plus all future modules for no extra charge.