Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <conio.h>
- void interschimba(int *c, int *d) {
- int temp;
- temp = *c;
- *c = *d;
- *d = temp;
- }
- void main() {
- int a, b;
- int *x, *y;
- printf("a= ");
- scanf_s("%d", &a);
- printf("b= ");
- scanf_s("%d", &b);
- x = &a;
- y = &b;
- interschimba(x, y);
- printf("a = %d si b = %d", *x, *y);
- _getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement