just like to add a point here,When we use
strcpy() function it actuaylly copies the 2nd string to the 1st one.
but when we assign
*p=x;
x=*q
*q=*p
like this here we only interchange the address variable.
these two things gives the same output but internal operation is different.