Why I can not use the inputted value from one-dimensional array, in C?
<p>I understand that: I can use a <strong>two-dimensional</strong> array for storaging many strings. But, I would like to solve this problem with <strong>one-dimensional</strong>; so, please <strong>do not</strong> advise me to use <strong>two-dimensional</strong> array for solving.</p>

<hr>

<p>I have a small <strong>one-dimensional</strong> array, which is used for storaging many strings. Here is all of source code:</p>

<pre><code>#include &lt;stdio.h&gt;

void main()
{
    #define MAX 10

    int N = 3;

    char * str[MAX];

    printf("Input a string in each line:\n\n");

    for (int i = 0; i &lt; N; i++)
    {
        printf("str[%d] = ", i);
         gets(str[i]);
    }

    printf("\n\n---\n\nExport the list of strings:\n\n");

    for (int j = 0; j &lt; N; j++)
    {
        printf("str[%d] = ", j);
        printf("%s\n", str[j]);
    }

}
</code></pre>

<p>When I compile it, the compiler <strong>does not</strong> return any error or warning. But, after I inputted the data, there is an error message from Windows:</p>

<blockquote>
  <p>A problem caused the program to stop working correctly</p>
</blockquote>

<p>Then, my program is broken.</p>