1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to reverse a string by using array method.?

Discussion in 'C' started by gahhon, Aug 28, 2010.

  1. gahhon

    gahhon Guest

    how to reverse it?
    i had tried

    void main()
    int i = 30;
    int x;
    char reverse[31];
    char title[31] = "programming concepts and design";

    for(x = 0; x >= 0; x++)
    reverse[x] = title;

    printf("The reverse order is %s\n", reverse[x]);
    the result show me is the system error and end of the program immediately.
    so what's wrong with the codes, so far i can't detect where im wrong.

Share This Page