#include <stdio.h> #include <stdint.h> typedef union{ uint32_t reg; uint8_t byte[4]; }Extract_byte; int main(){ Extract_byte value; scanf("%u", &value.reg); for(uint8_t i = 0; i<4; i++){ printf("%hhu ", value.byte[i]); } return 0; }
Test Cases
Test Results
Input
305419896
Expected Output
120 86 52 18