The main problem comes when we swap strings of unknown lengths. Lets say we have two strings assigned to two variables say a, b. Now if I use a temporary string say c, and use strcpy(c,a), then use strcpy(a,b) finally using strcpy(b,c).
It works when we have strings of equal length, but not with strings of different lengths. Is there any method to swap two strings of unknown lengths?