CMPT 242, Spring 2018

Lecture preparations

The course is being delivered as an inverted class. This requires an independent online preparation for the lectures and provides an opportunity for in-class exercises during the lecture time. The preparation materials for each week will be posted here, including videos (kindly provided by the University of Toronto), and follow-up quizzes.

The quizzes will be due at 2 PM on Tuesdays (just before the lectures), and will be worth 5% of the final mark. You must come to class prepared if you want to get the best value out of this course.

Code visualizer

Link.

1.1. Types, Variables and Assignment Statements

Sample code: hello.c, hello_world.c, assign.c, expressions.c, style.c, char.c

Follow-up Quiz 1: due January 30.

1.2. Input, Output and Compiling

Sample code: printf.c, convert.c, numbers.c

Follow-up Quiz 2: due January 30.

Follow-up Quiz 3: due January 30.

1.3. Conditionals

Sample code: feelings0.c, feelings.c, gpa.c, if.c

1.4. Functions

Sample code: function_calls.c, function_calls2.c, fmax.c, price_calc.c, price_calc_scope.c

Follow-up Quiz 4: due January 30.

1.5. Iteration

Sample code: daily_high_loops.c, lyrics.c, nested_square.c, nested_continue.c, multiplication_table.c, do_while_break.c

1.6. Arrays

Sample code: daily_highs.c, bounds.c

2.1. Type conversions

Follow-up Quiz 5: due February 6.

2.2. Pointers

Follow-up Quiz 6: due February 6.

3.1. Dynamic memory allocation

3.2. C memory model

Follow-up Quiz 7: due February 13.

3.3. Strings

Follow-up Quiz 8: due February 14.

Follow-up Quiz 9: due February 14.

3.4. Structs

3.5. Linked structures

Follow-up Quiz 10: due February 20.

4. Text Files

5. Useful C features

Follow-up Quiz 11: due March 8.

.

6. Reading and writing binary files

7. System calls

8. Processes and forks

Follow-up Quiz 12: due April 3.

9. Pipes

Follow-up Quiz 13: due April 10.

10. Signals

Follow-up Quiz 14: due April 17.

11. Multiplexing I/O

12. Function pointers