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

Using recursive Function:

void rev_str(char *str)
{
if(*str!=NULL)

rev_str(str+1);

printf("%c",str);
}

Is This Answer Correct ?    20 Yes 43 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you sort filenames in a directory?

1166


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

1080


what do you mean by enumeration constant?

1009


Difference between exit() and _exit() function?

1127


What is the scope of global variable in c?

986


What is volatile variable in c?

1087


what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above

1117


How can I swap two values without using a temporary?

1097


What is a nested formula?

1141


Tell me is null always defined as 0(zero)?

1087


Why isn't any of this standardized in c? Any real program has to do some of these things.

1200


Combinations of fibanocci prime series

1608


Explain how do you sort filenames in a directory?

1031


How can I list all of the predefined identifiers?

982


What are identifiers in c?

1199