CS520
Fall 2013
Lab 2a
Optional Session


Lab 2a Program Specifications

Write a program that takes a single command line argument and outputs the unsigned integer from the command line argument in binary form. Assume the integer is in hexadecimal format.

Examples:

The program should also be capable of handling various errors. Examples of errors include:

Writing the Program

We will walk through the process of writing this program, and will build it one line at a time. If you have any questions about what a particular bit of code does, please feel free to stop me and ask questions.

In order to make sure that all students are doing the same thing, we should all be working on either agate, or on one of the computers in this lab room.

We should also all compile with the same command, and the same flags. We will be using:

gcc -Wall -std=c99 binary_print.c -o binary_print

Last modified: Thu Sep 5 02:25:41 EDT 2013