Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.10 KB | None | 0 0
  1. $ gcc -DHEXADECIMAL -o proj2 proj2.c
  2. $ ./proj2
  3.  
  4. Input number: 287454020
  5.  
  6. Selection option:
  7.  
  8. 1 - Display number in hexadecimal
  9. 2 - Exchange left most byte with right most byte
  10. 3 - Exchange inner most bytes
  11. 4 - Display number of set bits in each byte
  12. 5 - Exit
  13.  
  14. Choice: 1
  15.  
  16. Number: 0x11223344
  17.  
  18. Selection option:
  19.  
  20. 1 - Display number in hexadecimal
  21. 2 - Exchange left most byte with right most byte
  22. 3 - Exchange inner most bytes
  23. 4 - Display number of set bits in each byte
  24. 5 - Exit
  25.  
  26. Choice: 2
  27.  
  28. Number Before: 0x11223344
  29. Number After: 0x44223311
  30.  
  31. Selection option:
  32.  
  33. 1 - Display number in hexadecimal
  34. 2 - Exchange left most byte with right most byte
  35. 3 - Exchange inner most bytes
  36. 4 - Display number of set bits in each byte
  37. 5 - Exit
  38.  
  39. Choice: 3
  40.  
  41. Number Before: 0x44223311
  42. Number After: 0x44332211
  43.  
  44. Selection option:
  45.  
  46. 1 - Display number in hexadecimal
  47. 2 - Exchange left most byte with right most byte
  48. 3 - Exchange inner most bytes
  49. 4 - Display number of set bits in each byte
  50. 5 - Exit
  51.  
  52. Choice: 4
  53.  
  54. Number: 0x44332211
  55. Byte 0 Count: 2
  56. Byte 1 Count: 2
  57. Byte 2 Count: 4
  58. Byte 3 Count: 2
  59.  
  60. Selection option:
  61.  
  62. 1 - Display number in hexadecimal
  63. 2 - Exchange left most byte with right most byte
  64. 3 - Exchange inner most bytes
  65. 4 - Display number of set bits in each byte
  66. 5 - Exit
  67.  
  68. Choice: 5
  69.  
  70. $ gcc -DBIN -o proj2 proj2.c
  71. $ ./proj2
  72.  
  73. Input number: 287454020
  74.  
  75. Selection option:
  76.  
  77. 1 - Display number in binary
  78. 2 - Exchange left most byte with right most byte
  79. 3 - Exchange inner most bytes
  80. 4 - Display number of set bits in each byte
  81. 5 - Exit
  82.  
  83. Choice: 1
  84.  
  85. Number: 00010001001000100011001101000100
  86.  
  87. Selection option:
  88.  
  89. 1 - Display number in binary
  90. 2 - Exchange left most byte with right most byte
  91. 3 - Exchange inner most bytes
  92. 4 - Display number of set bits in each byte
  93. 5 - Exit
  94.  
  95. Choice: 2
  96.  
  97. Number Before: 00010001001000100011001101000100
  98. Number After: 01000100001000100011001100010001
  99.  
  100. Selection option:
  101.  
  102. 1 - Display number in binary
  103. 2 - Exchange left most byte with right most byte
  104. 3 - Exchange inner most bytes
  105. 4 - Display number of set bits in each byte
  106. 5 - Exit
  107.  
  108. Choice: 3
  109.  
  110. Number Before: 01000100001000100011001100010001
  111. Number After: 01000100001100110010001000010001
  112.  
  113. Selection option:
  114.  
  115. 1 - Display number in binary
  116. 2 - Exchange left most byte with right most byte
  117. 3 - Exchange inner most bytes
  118. 4 - Display number of set bits in each byte
  119. 5 - Exit
  120.  
  121. Choice: 4
  122.  
  123. Number: 01000100001100110010001000010001
  124. Byte 0 Count: 2
  125. Byte 1 Count: 2
  126. Byte 2 Count: 4
  127. Byte 3 Count: 2
  128.  
  129. Selection option:
  130.  
  131. 1 - Display number in binary
  132. 2 - Exchange left most byte with right most byte
  133. 3 - Exchange inner most bytes
  134. 4 - Display number of set bits in each byte
  135. 5 - Exit
  136.  
  137. Choice: 5
  138.  
  139. $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement