Exercise 01 - C Compilation

Out: Monday January 8, 2018
Due: Wednesday January 10, 2018 by 11:15am.


  1. Fetch the source files, main.c, sub.h, sub.c, and makefile (or just the file ex01.tar.gz).

  2. Build an executable from the source code using the makefile. (Just say 'make'.) Note that it builds without error.

  3. Run the executable you just created: ./ex01
    Note that it gets what seems to be a wrong answer (2 to the power 4 isn't 1).

  4. Figure out why.

  5. Hand in to the course dropbox a pdf file listing your name and

  6. Don't hand in any code.