How to reverse a string using a recursive function, without
swapping or using an extra memory?

Answers were Sorted based on User's Feedback



How to reverse a string using a recursive function, without swapping or using an extra memory?..

Answer / mahendra aseri

Using recursive Function:

void rev_str(char *str)
{
if(*str!=NULL)

rev_str(str+1);

printf("%c",str);
}

Is This Answer Correct ?    20 Yes 43 No

Post New Answer

More C Interview Questions

write a c programs to do multiplication of two numbers with out using arithmatic operator ??????????

7 Answers   Infosys, TCS,


why 'c' is called middle level language.

2 Answers  


what are bps & baud rates? differentiate these two?

2 Answers   TCS,


which of the following shows the correct hierarchy of arithmetic operations in C a) (), **, * or/,+ or - b) (),**,*,/,+,- c) (),**,/,*,+,- d) (),/ or *,- or +

0 Answers  


What is adt in c programming?

0 Answers  


the expression a=30*1000+2768; evalutes to a) 32768 b) -32768 c) 113040 d) 0

1 Answers  


a=5 a=a++/++a

14 Answers   Bhel,


What are different storage class specifiers in c?

0 Answers  


In CMM or CMMI certified organizations,we assess only the standard software processes of the organization. We do not assess the organizations other functional departments like HR or Admin. Then how can we certify the entire organization as CMM level company?? We have assessed only software related activities. Right. There is no relation with other departments like Accounts, HR or Admin. Then how can we claim that the whole company is a CMM certified company?

1 Answers   Melstar,


Why do we write return 0 in c?

0 Answers  


what is a void pointer?

2 Answers  


What does 2n 4c mean?

0 Answers  


Categories