#include <stdio.h>
int main(void)
{
unsigned int original = 0xABC;
unsigned int result = 0;
unsigned int mask = 0xF; /* Righmost four bits */
printf("\n original = %X", original);
/* Insert first digit in result */
result |= original&mask; /* Put right 4 bits from original in result */
......................
阅读全部 | 2012年8月24日 22:55