// Pantea Aria // playing with pointers #include int main(void) { int a = 5; int b = 10; int *p = &a; int *q = &b; printf("Before:\n"); printf("a = %d, b = %d\n", a, b); // what is happening here? // let's draw diagrams *p = *p + *q; *q = *p - *q; *p = *p - *q; //*p = 100 - *q // *q = *p + *q - 90; // int y = *p / 10; printf("After:\n"); printf("a = %d, b = %d\n", a, b); //what will we see??? // printf(" .... "); return 0; }