/* interchange *p and *q */
void swap (int *p, int *q) {
int temp;
temp = *p;
*p = *q;
*q = temp;
}
/* somewhere in another function */
...
int a, b;
a = 4;
b = 7;
swap(&a, &b);
It will probably work best if the instructor leads the drama as the controller of the instructions.
For example, the person representing variable a would be assigned the value 4 (maybe the instructor could use a visual card with "4" printed on it) by holding this card. Similar actions could take place for variable b and temp. Students taking on pointer roles should point to the appropriate cards held by other students.
Encourage the students not participating as an actor to help lead the actors to accomplish their tasks. In fact, the instructor might add the restriction that the actors should only take the actions suggested by other members of the class.
Once the drama is finished, the instructor should go over the correct actions in the program. As a final piece of this activity, ask the students the types of each actor (int or pointer to int).