how to reverse the string without use of strrev function in c programming language​

By Ava

how to reverse the string without use of strrev function in c programming language​

About the author
Ava

1 thought on “how to reverse the string without use of strrev function in c programming language​”

  1. Answer:

    int main() { char s[1000], r[1000]; int begin, end, count = 0;

    printf(“Input a string\n”); gets(s);

    while (s[count] != ‘\0’) count++;

    end = count – 1;

    for (begin = 0; begin < count; begin++) { r[begin] = s[end]; end–; }

    r[begin] = ‘\0’;

    printf(“%s\n”, r);

    return 0;

    Explanation:

    Reply

Leave a Comment