Lecture 18: November 4, 2019
Reading
:
C text
, §10
Due
: Homework #3, due November 8, 2019
Greetings and felicitations!
Homework 1 grades have been posted
Be sure it runs on the CSIF and you use
-ansi -pedantic -Wall
when you compile
Also, comments must be
/* … */
All declarations at he beginning of functions or blocks, not in
for
loops
Homework 2 is now reopened until Wednesday so you can fix things that you lost points for on homework 1
Structures
User-defined datatype
As fields:
var.field
,
ptrvar->field
Use example of list of numbers (
usort2.c
)
Do insertion sort (
linked.c
)
Parallel arrays and arrays of structures
Show parallel arrays to sort planets in order of diameter (
planets1.c
)
Show same program using structures (
planets2.c
)
typedef
Using
sizeof
to get size of an array
Matt Bishop
Office: 2209 Watershed Sciences
Phone: +1 (530) 752-8060
Email:
[email protected]
ECS 36A, Programming and Problem Solving
Version of November 4, 2019 at 3:39PM
You can also obtain a PDF version of this.