//C has no references: the function gets
//the addresses of the variables
void swapStrings(const char **s1, const char **s2) {
const char *tmp = *s1;
*s1 = *s2;
*s2 = tmp;
}
const char *s1 = "A";
const char *s2 = "B";
swapStrings(&s1, &s2);
//s1 is "B", s2 is "A"
printf("s1 is %s\n", s1);
printf("s2 is %s\n", s2);