This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: E E 312 Notes Arithmetic Conversions With Floats- o + = Float Double Double o + = Double Int Double Not With Floats o + = Int int int o < < Int unsigned int long int o Never combine unsigned ints and regular ints in expressions- The value on the rights side is converted to the value on the left hand signed- Converting larger type to a smaller type may not always produce a meaning ful result- Characters are just little ints and still have the same problem Casting- Used for explicit type conversion- : Has the form (-- ) target type name expression /* * It s a unary operator \ Example = . Float f 842 97 = ( ) Float frac f int f /* ( ) = . = . */ int f 842 So Float Frac 97 : Wrong = ( ) ( * ) I long int j j Right = ( ) * I long int j j Type Definitions- Create an alias for a data type- Capitalize the First Letter Typedef float Dollars-- = . ; Dollars cash in bag 1 0 Operators- Size of an Operator- () Sizeof- Used to determine how much memory a particular date type requires in bytes...
View Full Document
- Spring '08