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 can I recover the file name given an open stream or file descriptor?

1076


Explain what is a stream?

1083


what is the basis for selection of arrays or pointers as data structure in a program

4305


When can a far pointer be used?

1021


which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;

3249


hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?

2123


What are disadvantages of C language.

1158


What is the use of f in c?

976


Which of the following operators is incorrect and why? ( >=, <=, <>, ==)

1162


What are unions in c?

1028


In a header file whether functions are declared or defined?

1123


Is c object oriented?

962


C language questions for civil engineering

1714


Explain can the sizeof operator be used to tell the size of an array passed to a function?

1065


What are the similarities between c and c++?

1065