Lecture 7: Arithmetic expressionsThursday, September 22, 2011 Status: complete
[Up] [Previous Lecture] [Next Lecture]
Powerpoint Slides: L09ArithmeticOps.ppt (Park)
Reading Assigned: 2.5
- Arithmetic expressions and operators
- Operator precedence and associativity
- Type conversion between int and float
- Students worked on Classwork 6 and Homework 3.
- This program and sample run shows the difficulties with working with user input, if the user types in garbage (e.g., types in letters when a number is expected, or types in extra characters): buffer.c and sample run. We will write programs to deal with such situations later, but for now, just realize that if the user types in unexpected values, your program might behave strangely.