Ryerson
University
Department of Computer Science
CPS 125 Digital Computation and Programming
Alex Ferworn's Lecture Notes
Introduction to Computers, ...welcome to the digital age.
Introduction to programming in C..The keys to dad's car
Stuff about Data types and Math
. About
Casting
, About
File input and output
. About
Math library functions
Making decisions in C...its all about zero
. Some examples of
if and switch
.
Looping in C
...its still all about zero but it happens again and again
About
functions and pointers
(call by val and ref):
Why be an engineer?
:
example 1
.
example 2. Example 3 (the bad one!)
Simple arrays
...like a list of friends who all have the same name. The
German Coast Guard
as a metaphor for learning C. Answers to midterm
WhiteQ1
,
WhiteQ2
,
BlueQ1
,
BlueQ2
.
An
example
passing an array pointer to a function.
Other arrays..
strings and multi-dimensional arrays
. String sorting
example
. Multiply two matrices
example
. A simple 2D array
example
. Some
review
.
Structuring data
through Data Structures.
Example
DMA. Example: Dynamic array of structures or your
friends
. A simple linked list
example
.
email:
aferworn@scs.ryerson.ca