Advertisement
Handde

asdasasa

May 11th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. main ()
  4. {
  5. unsigned char k=0x72;
  6. unsigned char mask=0x1C;
  7. unsigned char result, knew;
  8. result=k & mask;
  9. result=result>>2;
  10. printf("%s%d\n","Result 1 =" ,result);
  11. knew=k & ~mask;
  12. result=6<<2;
  13. knew=knew | result;
  14. printf("%s%x\n","Result 2 = 0x" ,knew);
  15. knew=0x80 ^ knew;
  16. printf("%s%x\n","Result 3 = 0x" ,knew);
  17. system("pause");
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement