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
- Pointer
- Discussions
Pointer
Pointer
Sort by
recency
|
1134 Discussions
|
Please Login in order to post a comment
include
include
include
using namespace std;
int add(int *ptr1, int *ptr2){ int sum = *ptr1 + *ptr2; return sum; };
int sub(int *ptr1, int *ptr2){ int sub = *ptr1 - *ptr2; return sub; };
int main() {
}
easy way to solve the problem
void update(int *a,int *b) { // Complete this function
}
int main() {
}
May be helpful you understand the stdlib.h
//Good luck
include
void update(int *a,int *b) { // Complete this function
int c=*a,d=*b; *a=c+d; *b=c-d; if(*b<0) *b=-(*b);
}
int main() { int a, b; int *pa = &a, *pb = &b;
}