title: To store character by character in String array
body: <p>I want to write a c program for splitting "23*34" string based on operator and store the numbers alone as a separate string in string array.I am the following code. </p>
  
  <pre><code>struct exp_details
  {
          char operator[10];
          char *number[10];
  }ed;
  
  int split(int m,int n,char *str) /*m for operator index, n for str index */
  {
          int i,j=0;
          for(i=n;(str[i] != ed.operator[m]) &amp;&amp; (str[i] != '\0');i++,j++)
          {
                  ed.number[m][j] = str[n];
          }
          if(str[i] != '\0')
          {
                  split(m++,i++,str);
          }
          else
                  return 1;
          return 0;
  }
  </code></pre>
  
  <p>but this coding shows segmentation fault. it is running upto </p>
  
  <pre><code>ed.number[m][j] = str[n];
  </code></pre>
  
  <p>this statement.I am thinking this statement only causing problem. I think, My logic is correct.But i don't know how to rectify it. Please Help me. Thank u in advance.</p>