Let int i; char c; double d
- Note in size
i = cis OK sincec = iis OK so long as theifits - If
idoesn’t fit, there are some wack rules you’d have to go throughd = iis OK if fits but approximates if it can’t be exact
i = d (truncates towards zero and is OK so long as the number fits)
- It’s better to be explicit than use some random rule that’s hard to remember, so type cast!
Also applies to when passing into functions: passing
char cintof(int)would implicitly convert the types (cuzchar < int)