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

how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?

1947


Why is c so powerful?

1119


C program to find all possible outcomes of a dice?

2365


What are the advantages of using new operator as compared to the function malloc ()?

1352


What is typedef example?

1193


Explain how can I prevent another program from modifying part of a file that I am modifying?

1095


What are the 4 types of organizational structures?

1109


how to introdu5ce my self in serco

2008


What are enumerated types?

1197


What is the method to save data in stack data structure type?

1092


Where local variables are stored in c?

1012


praagnovation

2290


What is void main () in c?

1214


What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }

1188


Write programs for String Reversal & Palindrome check

1064