练习2.7-2.16

 2.7

616263646566

 

2.10

x    |   y

a   |   a^b

b   |   a^b

b   |   a

 

2.11

A.k+1

B.最后一次inplace_swap地址相同

C.

1 void reverse_arrary(int a[],int cnt)
2 {
3     int first,last;
4 
5     for(first=0,last=cnt-1;first<last;first++,last--)
6         inplace_swap(&a[first],&a[last]);
7 }

 

2.12

A. x & 0x000000FF

B. x ^ 0xFFFFFF00

C. x | 0x000000FF

 

2.13

bis(x,y)

bic(x,y)

 

posted @ 2017-07-16 22:51  lan126  阅读(120)  评论(0编辑  收藏  举报