if(strcmp(p1,p2) < 0) swap(p1,p2);
void swap(char * p1,char * p2){ char temp[20]; strcpy(temp,p1); strcpy(p1,p2); strcpy(p2,temp);}