Solution for Exercise 1-1

ex0101

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Hello world!\n");
    return 0;
}

Output

Hello, world!

Notes

* This source code is from the Code::Blocks skeleton file.

* I really wish the Code::Blocks developers provided an easy way to replace the default source code file with something else, so that every time you started a new project the main.c file was either blank or more minimal.