title: Memory fault - c
body: <p>I do not know why I get Memory fault (core dumped) when I run this code</p>
  
  <pre><code>if (flg == 4) // PIPE
     {
  
       char **cmds;
       char ***cmdarg;
       int j=0;
  
       cmds = split_str(cmd, "|");
  
       for (i = 0; args[i] != NULL; i++)
       {
        if (strcmp(args[i], "|") == 1)
           {
            cmdarg[j][i]=args[i];
           }
        else
           {
            cmdarg[j][i+1] = NULL;
            j++;
           }
         printf("%s\n",cmdarg[j][i]);
       }
     }
  </code></pre>
  
  <p>I am not so expert with pointers and arrays</p>