function 1 is also swapping values but locally :
void fun1(char* s1, char* s2){
char* temp;
temp = s1;
s1 = s2;
s2 = temp;
}
here in stack s1 and s2 will be created but after execution they will distroy
void fun2(char** s1, char** s2){
char* temp;
temp = *s1;
*s1 = *s2;
*s2 = temp;
}
here s1 and s2 will be local it self but they are poining to pointers and modifications in pointer will be reflected outside also.