Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ gcc -DHEXADECIMAL -o proj2 proj2.c
- $ ./proj2
- Input number: 287454020
- Selection option:
- 1 - Display number in hexadecimal
- 2 - Exchange left most byte with right most byte
- 3 - Exchange inner most bytes
- 4 - Display number of set bits in each byte
- 5 - Exit
- Choice: 1
- Number: 0x11223344
- Selection option:
- 1 - Display number in hexadecimal
- 2 - Exchange left most byte with right most byte
- 3 - Exchange inner most bytes
- 4 - Display number of set bits in each byte
- 5 - Exit
- Choice: 2
- Number Before: 0x11223344
- Number After: 0x44223311
- Selection option:
- 1 - Display number in hexadecimal
- 2 - Exchange left most byte with right most byte
- 3 - Exchange inner most bytes
- 4 - Display number of set bits in each byte
- 5 - Exit
- Choice: 3
- Number Before: 0x44223311
- Number After: 0x44332211
- Selection option:
- 1 - Display number in hexadecimal
- 2 - Exchange left most byte with right most byte
- 3 - Exchange inner most bytes
- 4 - Display number of set bits in each byte
- 5 - Exit
- Choice: 4
- Number: 0x44332211
- Byte 0 Count: 2
- Byte 1 Count: 2
- Byte 2 Count: 4
- Byte 3 Count: 2
- Selection option:
- 1 - Display number in hexadecimal
- 2 - Exchange left most byte with right most byte
- 3 - Exchange inner most bytes
- 4 - Display number of set bits in each byte
- 5 - Exit
- Choice: 5
- $ gcc -DBIN -o proj2 proj2.c
- $ ./proj2
- Input number: 287454020
- Selection option:
- 1 - Display number in binary
- 2 - Exchange left most byte with right most byte
- 3 - Exchange inner most bytes
- 4 - Display number of set bits in each byte
- 5 - Exit
- Choice: 1
- Number: 00010001001000100011001101000100
- Selection option:
- 1 - Display number in binary
- 2 - Exchange left most byte with right most byte
- 3 - Exchange inner most bytes
- 4 - Display number of set bits in each byte
- 5 - Exit
- Choice: 2
- Number Before: 00010001001000100011001101000100
- Number After: 01000100001000100011001100010001
- Selection option:
- 1 - Display number in binary
- 2 - Exchange left most byte with right most byte
- 3 - Exchange inner most bytes
- 4 - Display number of set bits in each byte
- 5 - Exit
- Choice: 3
- Number Before: 01000100001000100011001100010001
- Number After: 01000100001100110010001000010001
- Selection option:
- 1 - Display number in binary
- 2 - Exchange left most byte with right most byte
- 3 - Exchange inner most bytes
- 4 - Display number of set bits in each byte
- 5 - Exit
- Choice: 4
- Number: 01000100001100110010001000010001
- Byte 0 Count: 2
- Byte 1 Count: 2
- Byte 2 Count: 4
- Byte 3 Count: 2
- Selection option:
- 1 - Display number in binary
- 2 - Exchange left most byte with right most byte
- 3 - Exchange inner most bytes
- 4 - Display number of set bits in each byte
- 5 - Exit
- Choice: 5
- $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement