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
|
676 Discussions
|
Please Login in order to post a comment
include
void update(int *a,int *b) { int sum,diff; sum = *a+*b; diff = abs(*a-*b); *a = sum; *b = diff;
}
int main() { int a, b; int *pa = &a, *pb = &b;
}
include
include
void update(int *a,int *b) {
} int main() { int a, b;
}
This challenge offers a great opportunity to build foundational skills and apply them to practical scenarios! 11xplay.pro
Addition and subtraction using pointers
I included
<stdlib.h>
to useabs()
function. Here you can see my code snippet for your reference. If you have any idea feel free to comment.