You are viewing a single comment's thread. Return to all comments →
more easier
#include <stdio.h> #include <stdlib.h> void update(int *a,int *b) { int plus, sub; plus = *a + *b; sub = *a - *b; *a = plus; *b= abs(sub); } int main() { int a, b; int *pa = &a, *pb = &b; scanf("%d %d", &a, &b); update(pa, pb); printf("%d\n%d", a, b); return 0; }
Seems like cookies are disabled on this browser, please enable them to open this website
Pointers in C
You are viewing a single comment's thread. Return to all comments →
more easier