Lecture 6: October 7, 2019
Reading
:
C text
, §3.3, 4.6
Due
: Homework #1, due October 9, 2019
Greetings and felicitations!
Homework problem 4: there are two files in /home/bishop/hw1-programs that may help:
vis-testfile
contains several non-printing characters
vis-output
contains the output of
vis
when given the file as input
Go through why UNIX and C were developed, and where Linux came from
Go through why we are learning C and Linux
How to write a program
Program: calculator that does +, −, *, /, %
Take it to design — then modularize
Functions in C
Parameters: pass (or call) by value
Arguments: instantiations of parameters matched in order
Return values
Scope: local variables
Show the program stack and how it relates to functions
Then translate to C
Matt Bishop
Office: 2209 Watershed Sciences
Phone: +1 (530) 752-8060
Email:
[email protected]
ECS 36A, Programming and Problem Solving
Version of October 12, 2019 at 10:42AM
You can also obtain a PDF version of this.