You are viewing a single comment's thread. Return to all comments →
void update(int *a,int *b) { int x = *a + *b; //initializing pointers addition inside variable. int diff = *a - *b; //initializing pointers difference inside variable.
if(diff < 0){ diff = -diff; //or you can use the abs( ) function for mod. } *a = x; *b = diff;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Pointer
You are viewing a single comment's thread. Return to all comments →
void update(int *a,int *b) { int x = *a + *b; //initializing pointers addition inside variable. int diff = *a - *b; //initializing pointers difference inside variable.
}