C examples for Data Type:Type Cast
Type cast numbers to characters and characters to numbers
#include <stdio.h> int main()/* ww w . j a va2 s . c o m*/ { int number = 86; char letter = 'M'; printf("\n86 type-casted to char is: %c\n", (char) number); printf("\n'M' type-casted to int is: %d\n ", (int) letter); }