there may some error above.


void reverse(char *x)
{
int i=0,j=0,z=0;
while(x[i]!='\0')
i++;
rev[i--]='\0';
z=i/2; //or z=i>>1;