this solution according to sameer statement solution if there is any
problem then pls tell me . here string or char is not being
store anywhere
char * reverse(char *str,int i ,int j)
{
while(i<j)
{
str[i]=str[i]^str[j];
str[j]=str[i]^str[j];
str[i]=str[i]^str[j];
i++;j--;
}
return str;
}
int main ()
{
char str[]="harish";
printf("%s",reverse(str,0,sizeof(str)-2));
return 0;
}
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.