Notes - 1.31 - E E 312 Notes Arithmetic Conversions With...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the 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

Page1 / 3

Notes - 1.31 - E E 312 Notes Arithmetic Conversions With...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online