Lecture 2 (September 28, 2015)

Reading: text §2


  1. Greetings and felicitations!
    1. About logging in to the CSIF: the accounts were set up by Friday, even for those on the wait list. Remember to use your Kerberos (CAS) id, not your email name; if problems persist, please go to room 47 and ask the student assistants there for help.
    2. The prerequisite test is not required! It is to help you decide whether this is the right course for you.
    3. Office hours and the first homework will be posted later today.a
  2. Variable names
  3. Basic types
    1. int, long vs. short, unsigned vs. signed
    2. char, treated like an int that holds 1 character
    3. float, double
    4. Type casting
  4. Basic operators
    1. arithmetic: +, -, *, /, %
    2. % defined so that n % p = r implies n = ap + r for some a
    3. 5 % -2 can be 1 (5 = (−2) × (−2) + 1) or −1 (5 = (−3) × (−2) + (−1))
  5. Associativity of operations
    1. Difference between associativity of operations and order of evaluation


You can also obtain a PDF version of this. Version of September 30, 2015 at 7:41AM