Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

what is the difference between. system call and library function?

2 Answers   CDAC, Satyam,


What is main function in c?

0 Answers  


#include<stdio.h> main() { char s1[]="Ramco"; char s2[]="Systems"; s1=s2; printf("%s",s1); } what will happen if you executed this code?

4 Answers   Ramco,


Is the below things valid & where it will be stored in memory layout ? static const volatile int i; register struct { } ; static register;

2 Answers   Lucent,


typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?

0 Answers   Wilco,


pgm to find middle element of linklist(in efficent manner)

4 Answers   Huawei,


Explain how can you tell whether two strings are the same?

0 Answers  


What is difference between %d and %i in c?

0 Answers  


What is the scope of an external variable in c?

0 Answers  


what are the 10 different models of writing an addition program in C language?

0 Answers  


A.C func() { pritnf(" in fuction %d",MACRO); } MAIN.c testfunc() { #define MACRO 10 printf("in test function %d", MACRO); } main() { printf("in main %d",MACRO); func(); testfunc(); getch(); }

2 Answers   Wipro,


What are dangling pointers? How are dangling pointers different from memory leaks?

1 Answers  


Categories