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 / bret

void revDisplay (char a[])
{

if(strlen(a) != 0)
{
revDisplay(a+1);
cout << a[0];
}
}

Is This Answer Correct ?    6 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the value of a[3] if integer a[] = {5,4,3,2,1}?

1030


a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none

1089


Do you know null pointer?

975


Why can't I perform arithmetic on a void* pointer?

1045


How can I remove the leading spaces from a string?

1097


In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)

2058


Write a program to print ASCII code for a given digit.

1036


How can you tell whether a program was compiled using c versus c++?

1044


Write a program to print fibonacci series without using recursion?

1066


What is a method in c?

1063


Explain what is the difference between a string and an array?

1101


Can we assign string to char pointer?

1042


What does %d do?

1205


What does c in a circle mean?

1022


in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above

1016