Pointers in C

  • + 0 comments

    include

    include

    void update(int *a,int *b) { *a=*a + *b; *b=abs(*a - *b); // Complete this function
    }

    int main() { int a, b; int *pa = &a, *pb = &b;

    scanf("%d %d", &a, &b);
    update(&a, &b);
    printf("%d\n%d", a, b);
    
    return 0;
    

    }