Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void ft_swap(int *a, int *b){
- int tmp;
- int tmp2;
- tmp = *a;
- tmp2 = *b;
- tmp = tmp + tmp2;
- tmp2 = tmp - tmp2;
- tmp = tmp - tmp2;
- }
- int main(){
- int a1 = 19;
- int b1 = 20;
- int *a = &a1;
- int *b = &b1;
- ft_swap(int *a, int *b);
- printf("%d", tmp);
- printf("%d", tmp2);
- }
Advertisement
Add Comment
Please, Sign In to add comment