Multiple choice:The functions of the following functions are
The function of the following function is @ [D] (2)
```
void Exchange(int *p1, int *p2)
{
int p;
p = *p1;
*p1 = *p2;
*p2 = p;
}
```
A. Exchange addresses of \ * P1 and \ * P2
B. May cause system failure
C. Correct, but cannot change the values of \ * P1 and \ * P2
D. Exchange the values of \ * P1 and \ * P2
A. Exchange addresses of \ * P1 and \ * P2
B. May cause system failure
C. Correct, but cannot change the values of \ * P1 and \ * P2
D. Exchange the values of \ * P1 and \ * P2
answer:D
```
void Exchange(int *p1, int *p2)
{
int p;
p = *p1;
*p1 = *p2;
*p2 = p;
}
```
A. Exchange addresses of \ * P1 and \ * P2
B. May cause system failure
C. Correct, but cannot change the values of \ * P1 and \ * P2
D. Exchange the values of \ * P1 and \ * P2
A. Exchange addresses of \ * P1 and \ * P2
B. May cause system failure
C. Correct, but cannot change the values of \ * P1 and \ * P2
D. Exchange the values of \ * P1 and \ * P2
answer:D