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
How do I swap bytes?
Explain the difference between exit() and _exit() function?
What does & mean in scanf?
If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402
How do you convert strings to numbers in C?
How can I do graphics in c?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
what is the height of tree if leaf node is at level 3. please explain
Why is c not oop?
What are dangling pointers in c?
What is an endless loop?
By using C language input a date into it and if it is right?
What does p mean in physics?
which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)