C program to extract bytes from an integer (Hexadecimal) value
This program will extract bytes values from an integer (hexadecimal) value. Here we will take an integer value in hexadecimal format and then extract all 4 bytes in different four variables. The logic behind to implement this program - right shift value according to byte position and mask it for One byte value (0xff).
Extract bytes from an integer (Hexadecimal) value using C program
Output: