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

What is the use of f in c?

943


How will you declare an array of three function pointers where each function receives two ints and returns a float?

1313


Can include files be nested?

1067


What are dangling pointers? How are dangling pointers different from memory leaks?

1245


What is scanf () in c?

1070


Is void a keyword in c?

936


#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }

1101


Do character constants represent numerical values?

1293


exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above

1090


What are the 5 data types?

1065


Why is c still so popular?

1014


Who is the founder of c language?

1124


write a program to find out prime number using sieve case?

2050


why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???

1919


which is an algorithm for sorting in a growing Lexicographic order

1753