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
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
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
Do you know null pointer?
Why can't I perform arithmetic on a void* pointer?
How can I remove the leading spaces from a string?
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)
Write a program to print ASCII code for a given digit.
How can you tell whether a program was compiled using c versus c++?
Write a program to print fibonacci series without using recursion?
What is a method in c?
Explain what is the difference between a string and an array?
Can we assign string to char pointer?
What does %d do?
What does c in a circle mean?
in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above