Programming Practice

Write a C program to enter a 32-bit unsigned integer and output its value in hexadecimal and binary formats. Repeat the step until the input is zero.

Input a non-negative integer (in decimal format): 4096
The hexadecimal representation is: 0X00001000
The binary representation is: 0000 0000 0000 0000 0001 0000 0000 0000

--------------------------------------------------

Input a non-negative integer (in decimal format): 1057882146
The hexadecimal representation is: 0X3F0E0022
The binary representation is: 0011 1111 0000 1110 0000 0000 0010 0010

--------------------------------------------------

Input a non-negative integer (in decimal format): 467920384
The hexadecimal representation is: 0X1BE3E600
The binary representation is: 0001 1011 1110 0011 1110 0110 0000 0000

--------------------------------------------------

Input a non-negative integer (in decimal format): 987342105
The hexadecimal representation is: 0X3AD9A519
The binary representation is: 0011 1010 1101 1001 1010 0101 0001 1001

--------------------------------------------------

Input a non-negative integer (in decimal format): 0
The hexadecimal representation is: 0X00000000
The binary representation is: 0000 0000 0000 0000 0000 0000 0000 0000

--------------------------------------------------