Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- void changeValues(int* a, int* b, int* temp){
- *temp = *a;
- *a = *b;
- *b = *temp;
- printf("Value of a: %d\n", *a);
- printf("Value of b: %d", *b);
- }
- int main()
- {
- int a = 5;
- int b = 10;
- int temp;
- changeValues(&a, &b, &temp);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement