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

Why void is used in c?

1019


what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)

2412


What is difference between %d and %i in c?

1241


What is the difference between printf and scanf )?

1098


Whats s or c mean?

1027


Are the outer parentheses in return statements really optional?

1117


What's the difference between constant char *p and char * constant p?

1153


What are runtime error?

1135


What do you mean by recursion in c?

1114


Is array name a pointer?

1035


Explain what’s a signal? Explain what do I use signals for?

1165


Why double pointer is used in c?

1043


Write a program to replace n bits from the position p of the bit representation of an inputted character x with the one's complement. Method invertBit takes 3 parameters x as input character, p as position and n as the number of positions from p. Replace n bits from pth position in 8 bit character x. Then return the characters by inverting the bits.

4214


Explain how do you sort filenames in a directory?

1043


Is the exit() function same as the return statement? Explain.

1104