Take FREE!! Online Mettl Mock Test to Crack TechM and Other Companies Written Exams.
Get Off-Campus Placement Jobs Info !!!
TCS NQT Technical and Managerial Round Interview Questions

Program Discussion :: Strings

Home > Programs > Strings

7 / 59

Write recursive function for reversing a string.



char* reverseString(char* str);

int main()
    int i, j, k;
    char str[100];
    char *rev;
    printf("Enter the string: ");
    printf("The reversed string is: %s ",rev);
    return 0;
char* reverseString(char *str)
    static int i = 0;
    static char rev[100];
    return rev;

Asked In :: Global Edge

Post Your Answer Here:


Post Your Reply Here: