Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void switcheroo(double *x, double *y);
- int main()
- {
- double a = 67.8889939993;
- double b = 40.747474788292;
- printf("before switch %d, %d\n", a, b);
- switcheroo(&a, &b);
- printf("this is value switched %d, %d\n", a, b);
- }
- void switcheroo(double *a, double *b)
- {
- double temp;
- temp = *a;
- *a = *b;
- *b = temp;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement