Computer
Systems

Fall 2010
course
navigation

sep 7

preliminaries

Aside : Net neutrality comment request http://www.fcc.gov/Daily_Releases/Daily_Business/2010/db0901/DA-10-1667A1.pdf

C

general discussion of C

First, don't forget
Second : coding style
/* total.c | Jim M | Sep 2010 * simple class example * * $ gcc total.c -o total * $ ./total * Total of integers from 17 to 203 is 20570. */ #include <stdio.h> int main(){ int i; int low = 17; int high = 203; int total = 0; for (i = low; i <= high; i++){ total += i; } printf("Total of integers from %i to %i is %i.\n", low, high, total); return 0; }
Discuss declarations and sizes; see attached sizes.c
Discuss typedefs, structs, malloc, and all that : see attached 9b.c
A (much) more elaborate example : http://code.google.com/p/jimmahoney/source/browse/#hg/c
To come :
Going on : continue reading chapter 2 in text.
http://cs.marlboro.edu/ courses/ fall2010/systems/ notes/ sep_7
last modified Tuesday September 7 2010 10:14 am EDT

attachments [paper clip]

     name last modified size
[COD]9a.c Sep 7 2010 12:05 am 737B [COD]9b.c Sep 7 2010 12:05 am 1.59kB [COD]sizes.c Sep 7 2010 12:06 am 1.58kB [COD]total.c Sep 7 2010 12:06 am 382B