ECS 30 Lecture Notes - Operand, Odometer
Document Summary
Adding one to the number of an of a char type will cause it to go to the next letter up. Something like -16/3 or -16%3 could be dangerous. Dividing or modulus by zero will lead to an application crashing. If the operands are floating point numbers and one is an int, it will become a float, as the solution itself. If the operand is smaller than int, it will automatically become an unsigned or signed int. If a type is too small, you will lose a piece of information when converting. Placing the type declaration before a number gives a way to alter an expression. (int)3. 3 becomes 3. Overflow is when a type is too small to hold values, so it overflows. Unsigned types and signed types wrap around like an odometer. Data that can"t be represented by floats should be thought of as infinity.