How to reverse a string using a recursive function, without
swapping or using an extra memory?
Answer Posted / asdf
void reverse_string(char *string) {
if (*str) {
reverse_string(++str);
str--;
printf("%c",*str);
}
| Is This Answer Correct ? | 2 Yes | 14 No |
Post New Answer View All Answers
What are the application of void data type in c?
Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?
What is define directive?
Is it possible to have a function as a parameter in another function?
in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none
Explain how do you declare an array that will hold more than 64kb of data?
What is c method?
What is c mainly used for?
Explain how can you tell whether a program was compiled using c versus c++?
Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result
What is dangling pointer in c?
What are global variables?
What is the difference between #include
When is a “switch” statement preferable over an “if” statement?
What kind of structure is a house?