[FrontPage] [TitleIndex] [WordIndex

Note: You are looking at a static copy of the former PineWiki site, used for class notes by James Aspnes from 2003 to 2012. Many mathematical formulas are broken, and there are likely to be other bugs as well. These will most likely not be fixed. You may be able to find more up-to-date versions of some of these notes at http://www.cs.yale.edu/homes/aspnes/#classes.

More C: integer types and expressions; declarations and variables. Readings: KernighanRitchie Chapter 2, C/Variables, C/IntegerTypes.

Theme: C is an imperative language: we think of each step of a program as changing the state of the memory the running program to some new state. Today, we'll talk about what the state actually consists of, and how we name pieces of it so the compiler understands what we want to do with it.

See C/Variables and C/IntegerTypes for details; we discussed declaring variables (but not style considerations) and the basic integer types up through integer literals and arithmetic operations. We didn't talk about other operators on integers; these will sneak in later.

2014-06-17 11:58