We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- C
- Introduction
- Pointers in C
- Discussions
Pointers in C
Pointers in C
Sort by
recency
|
686 Discussions
|
Please Login in order to post a comment
include
include
void update(int *a, int *b) { int sum = *a + *b; int difference = abs(*a - *b); *a = sum; *b = difference; }
int main() { int a, b; scanf("%d %d", &a, &b); update(&a, &b); printf("%d\n%d", a, b); return 0; }
C is such a powerful and foundational language—great for understanding how computers really work. betguru 247 net sign up