# Type Juggling

• Arithmetic Operator: addition(+), subtraction(-), multiplication(*), division(/)

Types Boolean Integer Float Point String
Boolean X X X X
Integer X O O X
Float Point X O O X
String X X X X
• Arithmetic Operator: the rest (%)

Types Boolean Integer Float Point String
Boolean X X X X
Integer X O X X
Float Point X X X X
String X X X X
• Bitwise Operator: AND(&), OR(|), XOR(^), left shift(<<), right shift(>>)

Types Boolean Integer Float Point String
Boolean X X X X
Integer X O X X
Float Point X X X X
String X X X X
• Bitwise Operator: compliment(~)

Boolean Integer Float Point String
X O X X
• Comparison Operator
less than(<), greater than(>), less or equal(<=), greater or equal(>=)

Types Boolean Integer Float Point String
Boolean X X X X
Integer X O O X
Float Point X O O X
String X X X O
• Comparison Operator: equal(==), not equal(!= and <>)

Types Boolean Integer Float Point String
Boolean O X X X
Integer X O X X
Float Point X X O X
String X X X O
• Increment/Decrement Operator: increment(++), decrement(--)

Boolean Integer Float Point String
X O X X
• Logical Operator: AND(&&), OR(||)

Types Boolean Integer Float Point String
Boolean O O X O
Integer O O X O
Float Point X X X X
String O O X O
• Logical Operator: NOT(!)

Boolean Integer Float Point String
O O X O
• Sign Operator: positive(+), negative(-)

Boolean Integer Float Point String
X O O X
• Expression in Control Structure: if, for, (do) while

Boolean Integer Float Point String
O O X O
• printf function output format

Types Boolean Integer Float Point String
%b, %o, %x X O X X
%d, %u X O X X
%c X O X X
%e, %f, %g X X O X
%s X X X O