ECE 209 Exam 1 Problems

Problem 2

Neither 0209 or 00209 are valid integer literals because both contain the digit 9, which is a legal digit in in an octal constant.

Problem 3

I'm afraid there were three expressions that aren't quite right.

In the first two, the question mark and colon were reversed. In the third, the equal sign and star were reversed. I should have sent these things through the compiler first.

Formally, the third is a legal C expression that uses the unary * (dereference) operator, but * shouldn't be applied to an integer.