Program to determine ranges of char, short, int and long variables, both signed and unsigned
Signedness of unqualified char is implementation defined. It may well be possible that char is in fact unsigned. Change char to signed char.
A char is not guaranteed to have 8 bits (it is guaranteed to have at least 8 bits). Use CHAR_BIT instead.
Narrowing types (e.g. assigning long to char) always make me uncomfortable. A better technique to get a value with only MSB set is (TYPE is either char,int,long,whatever) 

unsigned TYPE value = ~(((unsigned TYPE) -1) &gt;&gt; 1)