Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to reverse a string using a recursive function, without
swapping or using an extra memory?

Answer Posted / mahendra aseri

Reverse a string

void ReverseString (char *String)
{
char *Begin = String;
char *End = String + strlen(String) - 1;
char TempChar = '\0';

while (Begin < End)
{
TempChar = *Begin;
*Begin = *End;
*End = TempChar;
Begin++;
End--;
}
}

Is This Answer Correct ?    24 Yes 27 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between Function to pointer and pointer to function

1124


What is local and global variable in c?

1248


int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;

1925


What is the total generic pointer type?

1207


What is masking?

1213


How many levels deep can include files be nested?

1183


What is a pointer value and address in c?

1179


How can I recover the file name given an open stream or file descriptor?

1134


What are lookup tables in c?

1033


What is the use of typedef in c?

1078


How are structure passing and returning implemented?

1085


Write a code to generate divisors of an integer?

1103


Write a program of advanced Fibonacci series.

1203


How many keywords are there in c?

1120


What is getch () for?

1312