首页 > 代码库 > computer systems work from a programmer's perspective

computer systems work from a programmer's perspective

2.

 

typedef unsigned char *byte_pointer;

void show_bytes(byte_pointer start, size_t len) {

  int i;

  for (i=0;i<len;i++)

    printf(" %.2x",start[i];

  printf("\n");

}

void inplace_swap(int *x,int *y) {

  *y = *x^*y;

  *x = *x^*y;

  *y = *x^*y;

}

 

computer systems work from a programmer's perspective