Learn to use the C Reference Card. Do not bring a copy to the exam. One will be provided for you.
The first exam covers Chapters 1 to 7 of the textbook. The emphasis is on reading C and writing very short sections of C, similar to those you've included in the programming assignment.
You should wish to review a copy of last Fall's exam and try out the solution program or, at least, read the printout of running the solution program. You need to be able to solve all the problems on last year's exams.
The first exam will cover elements of C covered in Homeworks E1 to E4. You need to be able to independently write a solution to these programs.
Class | Example | Associativity |
---|---|---|
Unary postfix | ++ , -- |
Right to left |
Unary prefix |
+ , - , ! , ( type) ,
sizeof , ++ , --
|
Left to right |
Multiplicative |
* , / , %
|
Left to right |
Binary additive |
+ , -
|
Left to right |
Comparative binary |
< , > ,
<= , >=
|
Left to right |
Equality binary |
== , !=
|
Left to right |
Logical and |
&&
|
Left to right |
Logical or |
||
|
Left to right |
Ternary conditional |
? |
|
Right to left |
Assignment operator |
= , =* , =/ , =% ,
=+ , =-
|
Right to left |
Comma (sequencing) |
,
|
Left to right |
printf
and scanf
onlywhile
loopsfor
loopsif
statementif
-else
statementswitch
statement
case
default
break
main
printf
scanf
&
scanf