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 can you find out how much memory is available?
Why double pointer is used in c?
What are extern variables in c?
What is the function of volatile in c language?
Define Array of pointers.
What is the c value paradox and how is it explained?
How many identifiers are there in c?
any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()
What does the error message "DGROUP exceeds 64K" mean?
Can stdout be forced to print somewhere other than the screen?
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
What is define directive?
What is bash c?
What is pass by value in c?
Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?