Learn to use the C Reference Card.
The first exam covers Chapters 1 to 8 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 may wish to review a copy of last Fall’s exam. No solution has been generated for this exam; however, NetBeans provides a very educational way for you to verify your answers to this exam.
The first exam will concentrate on the elements of C covered in homeworks and in Assignment 1.
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
&
getchar
putchar
scanf
and getchar
scanf
scanf