-->
当前位置:首页 > 题库

PROGRAMMING:Pointer as function parameter (exchange variable)

Luz5年前 (2021-05-10)题库384
```
#include
Void swap (int * PA, int * Pb) {/ / exchange * PA and * PB
//Please add the code here
}
int main(){
int a,b;
scanf("%d%d",&a,&b);
swap(&a,&b);
printf("%d %d",a,b);
return 0;
}
```
Add the above code to exchange the value of the variable.
###Input format:
Two integers
###Output format:
Two integers after swapping positions
###Input example:
```in
18 -299
```
###Output example:
```out
-299 18
```







answer:If there is no answer, please comment