How to reverse a string using a recursive function, without
swapping or using an extra memory?
Answer Posted / aravind
#Include<stdio.h>
void display(char*)
void main()
{
char str[]= "Aravind"
disply(str)
}
void display(char *p)
{
static int i=1;
if(*p=='\0')
{
display(p+i)
i++
}
printf("%c",*p)
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
When should volatile modifier be used?
What is line in c preprocessor?
How are Structure passing and returning implemented by the complier?
Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.
Explain what is the benefit of using enum to declare a constant?
Why does this code crash?
How can I sort more data than will fit in memory?
How do you determine a file’s attributes?
What is a void * in c?
What is the difference between the local variable and global variable in c?
Why & is used in scanf in c?
What does c mean in basketball?
number of times a digit is present in a number
why do some people write if(0 == x) instead of if(x == 0)?
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)