• + 0 comments

    void update(int *a,int *b) { int sum= (*a)+(*b); int diff= abs((*a)-(*b));
    (*a)=sum; (*b)=diff; } this may help :)