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


Please Help Members By Posting Answers For Below Questions

write a program to find out prime number using sieve case?

927


hi friends how r u as soon in satyam my interview is start but i m very confusued ta wat i do plz help me frndz wat can i do plz tell me some question and answers related with "C" which r asked in the interview .

1151


int far *near * p; means

2329


#include int main(){ int i=10; int *ptr=&i; *ptr=(int *)20; printf("%d",i); return 0; } Output: 20 can anyone explain how came the output is 20

387


what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)

1244






A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM

996


Hi can anyone tell what is a start up code?

945


WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.

1324


Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result

694


how could explain about job profile

798


write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.

2655


difference between object file and executable file

4464


Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon

4546


write a program to print largest number of each row of a 2D array

1218


a program that can input number of records and can view it again the record

812