16 lines
304 B
C
16 lines
304 B
C
|
|
#include <stdio.h>
|
||
|
|
#include <stdlib.h>
|
||
|
|
|
||
|
|
int main(void) {
|
||
|
|
int a = 1, b = 2, c = 3, d = 4;
|
||
|
|
int *p1 = &a, *p2 = &b, *p3 = &c, *p4 = &d, *p5;
|
||
|
|
|
||
|
|
p5 = p3;
|
||
|
|
*p3 = *p2;
|
||
|
|
*p2 = *p5;
|
||
|
|
*p4 = *p1;
|
||
|
|
*p1 = *p4;
|
||
|
|
printf("a, b ,c and d are equal to: %d, %d, %d and %d\n", a, b, c, d);
|
||
|
|
exit(EXIT_SUCCESS);
|
||
|
|
}
|