CS520
Fall 2013
Lab 4
Due Wednesday, September 18
Casting a double to a long
Begin this lab by downloading the following files:
- lab4_main.c: Main file for the program
Detailed instructions
- Log on to one of the computers in the lab.
- Open up a terminal
- Go to the directory where you started your program 2, and download
the new main function into that folder.
- To compile this program type:
gcc lab4_main.c convert.c -Wall -o lab4 -std=c99
- When you are done, submit your source file. In order to submit
your file, you will need to be SSH'd in to agate.
~cs520/bin/DoSubmission.py lab3 convert.c
I will use my own
copy of the main function, and the header file, so if you do modify
those, your modifications will not be used when grading your program.
For this lab, I will not be doing other tests on your program. If
your program passes all of the tests in the supplied main file, you
will get a perfect score on the execution portion of this assignment.
Note you will still be required to submit good looking code.
Submitting
Please submit whatever you have at the end of lab, even if it is
incomplete. You have the rest of today to finish this assignment.
Grading
Your program will be graded primarily by testing it for correct
functionality.
- I am giving you a main file that does some simple tests with
your program. 100 points will be awarded for passing the simple
tests associated with the testing main file that I give you.
-
Do not return the result of a cast, or you will receive a 0.
In addition, remember, you may lose points if your program is not properly
structured or adequately documented.
Coding guidelines are given on the
course
overview webpage.
Next Steps
Some students may have finished the work for this lab already. For
those students, I would encourage you to work on converting larger
floating point numbers, and handling overflow situations.
Last modified: Tue Sep 10 04:27:33 EDT 2013