Is char c2=i1<<8>>24; valid C syntax? (Where i1 is and unsigned integer) Additionally, will it yield the result of shifting i1
char c2=i1<<8>>24;
i1
As others have noted, it's valid syntax. You can achieve the effect that I believe is desired more understandably and portably with:
unsigned char c2 = (i1 & 0xff0000) >> 16;