Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How to understand swap(a, b+ 1) and swap (&; A[ 1], b) What are the relations between two independent variables and int *c0, int *c 1?
How to understand swap(a, b+ 1) and swap (&; A[ 1], b) What are the relations between two independent variables and int *c0, int *c 1?
In swap(a, b+ 1), a is the first address of array a, which means & A[0], and b+ 1 is the first address of array b plus 1, which means b[ 1].

Interchange (ampA[ 1], b) in&; A[ 1] is the address of array a[ 1], and b is the first address of array B.

C0 and c 1 just exchange integer pointers, and there is no relationship between them.