Lecture 2 Objectives
At the end of today's class you should
KNOW:
- How to formulate Boolean expressions
- When to use the if and if...else selection
statements
- The assignment operators for abbreviating assignment expressions
- That cast operators can be used to convert one data type to another
BE ABLE TO:
- translate an English description into an appropriate C Boolean
expression
- write a C program that uses the if or if...else
selection structure
- explain how a cast operator affects the value of an expression
Sample Exam Question:
Write a syntactically-correct C Boolean expression for the following
English expression:
the value of x is neither 5 nor 12