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
How to Throw some light on the splay trees?
What is extern c used for?
Write a code to remove duplicates in a string.
Explain why can’t constant values be used to define an array’s initial size?
Explain 'bit masking'?
Why do we use main function?
What is void pointers in c?
What is c method?
What is the benefit of using an enum rather than a #define constant?
Is it better to bitshift a value than to multiply by 2?
regarding pointers concept
What is the purpose of main( ) in c language?
Is null valid for pointers to functions?
I need a help with a program: Write a C program that uses data input in determining the whole of points A and a whole of circles B. Find two points in A so that the line which passes through them, cut through the maximum number of circles.
Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon