type conversions

How do i preform type conversions? for example converting an int to char?

is done in C by casting as follows:

int i = 64; char c;

c = (char)i; // (char) casts the variable i to a char

casting can have unexpected side affects because the value after the cast may not fit in the variable it is cast to. For example if the int i was equal to 256 before the cast, the char won't be equal to that after the cast because the maximum value for a char is 255.