Review of Topics for Midterm 1
Lecture Week 1
, Chapters 1-2
-
Definitions of program and problem solving
-
Basic structure of a computer
-
Basic structure of a C program
-
Simple UNIX commands, including compiler invocation
Lecture Week 2
, Chapters 2-3
-
Program variables
-
Types int, double, char
-
Arithmetic expressions
-
Assignment statements
-
Mathematical library functions
-
Value input with scanf
-
Value output with printf
-
Defining simple program functions
-
Program execution and testing
-
The layout of program memory
Lecture Week 3
, Chapters 3-4
-
Program definition with multiple functions
-
Function parameters and return value
-
The use of function prototypes
-
If statements
-
If-else statements
-
Conditional expressions
-
Operator precedence
-
The difference between '=' and '=='
-
Nested if statements
-
Switch statements