Welcome to CS 16 Problem Solving with Computers (I)!

TA Office: Trailer 936 Room 104
My Office Hour: Tuesday 4-6pm
My Email: yanzi [at] cs.ucsb.edu
Note: I will not hold office hour on Feb. 10th.
Instead, I will hold an additional one the week after on Thursday (Feb. 19th). Same time, same location.

CS 16 Programming Assignments

Lab Assignment Hints/Slides
Midterm 2 on Monday (Mar 9)
  1. Understand the types of different variables. For instance, if we say "int *a", what is the type of "a", what is "*a", and what is "&a"?
  2. Understand difference between array and linkedlist
  3. Note: Exam date has been changed.
lab09: Array vs LinkedList due 5pm, Mar 06
  1. Function "copyOddOnly" is actually asking you to extract src to dest. For example, if src is {1,2,3}, you want dest to be {1,3} instead of {1,0,3}.
lab08: LinkedList due 5pm, Feb 27
  1. LinkedList can be really tricky, but remember it is just a sequence of Nodes, consisting of a value and a pointer to the next Node.
  2. Unless specified, all you can see in the list is the first Node, which is the "head". In the case of lab, you have an additional known Node, called "tail".
  3. The key of understanding LinkedList is to figure out where ".next" is pointing at.
  4. LinkedList is different from Array. You can access an array element by its index, but you have no index information in LinkedList.
lab07: Structs2 due 5pm, Feb 20
  1. Simply modify the given function to finish STUBs.
  2. This is an REQUIRED paired programming assignment.
lab06: Structs due 5pm, Feb 13
  1. Notice that "initPoint(struct Point *p, double xVal, double yVal)" is for point initialization. You need to assign the values in xVal and yVal to the point.
  2. This is an optional paired programming assignment.
Midterm 1 on Monday (Feb 2)
  1. Make sure you tried previous year's exams at least once
lab05: Compilation due 5pm, Feb 6
  1. This is a REQUIRED pair-programming assignment.
lab04: ASCII Art due 5pm, Jan 30
  1. Very Cool at http://asciiart.en.utf8art.com/arc/animal_77.html
                 _,.. -‐‐-ッ'⌒丶、
            _   ,, ‐''"      、    `ー- ..,,_
            /:. ` '          `丶、__.,,/
         /:.:.:  、             `、
          /:.:.:.:. ノ               |
        /:.:.:.:.;/:.:.:.           _,,__!、
       r':.:,;/ヘ:.:.:.:.:.:.        __‐≠゙`‐ ヽ
        ̄    丶:.:.:.:.:.   __,. ィ'.・,,!   ヽヽ`}
               !:.:.:.:ァ=チ''´  `" _,      ノ
              !.:.:.:.:.:.ヽヽ`   ̄    ,-'´
                ヽ、_.:.:.:.:.:._,、_ _,,ノ´}
               /` ̄`゙゚0oo。。o゚', 丿
                〈:.:.:. ヽ、 (||`l´||)〈
              \ 丿 〉  ヾl|レ'゙ }
              ,,、 }`ー'´       j
             _(0ノ{:.:.:.:.:..       /
             `^゙‐'、:.:.:.:.:.:..  v' /
                    ヽ:.:.:.:.:.:.  V゙
                /:\.:.:.:.: 」
                !:.-;人;' ̄.:.}
                    ̄    ̄`´
lab03: Command Line Arguments due 5pm, Jan 30
  1. About for-loop syntax: for (initialization; condition; increase) { statement; }
lab02: Functions due 5pm, Jan 23
  1. Always write a prototype before you actually define a function.
  2. Sidenote 1: "argc" stores the number of arguments passed into the program, and "argv" stores the arguments.
  3. Sidenote 2: "cerr" means standard error stream, "cout" is standard output stream, "cin" is standard input stream.
  4. Again, pay attention to INDENTATION.
lab01: Ducks! due 5pm, Jan 16
  1. The lab wiki pretty much explains everything. Please take a look.
  2. Pay attention to the indentation and variable names!! The beauty of your code counts 40%!
lab00: Orientation due 5pm, Jan 16
  1. Slide for Lab00

Q&A