title: How can array of arrays be used to store string of variable length in C language?
body: <p>The following is my code</p>
  
  <pre><code>int main(){
     char *movies[500];
     int i=0;
  
     while(*(movies[i])!='$'){
          scanf("%s",(movies[i]));
          i++;  
     }
  }
  </code></pre>
  
  <p>The output is a segmentation fault. Can someone please explain?</p>