title: how to initialize a char in a struct
body: <p>I made a struct with three char:</p>
  
  <pre><code>typedef struct{
    char inside;
    char condition;
    char whattoprint;      
  } array;        
  </code></pre>
  
  <p>Then I make a 2d (array type) table and malloc it and all good by now</p>
  
  <p>Then I want to call a function where I want to initialize my table and its like this:</p>
  
  <pre><code>array **initialize_table(int x,int y,array **table){
      int i,j;
      for(i=0;i&lt;=x;i++){
         for(j=0;j&lt;=y;j++){
            table[i][j].inside='.';
         }
      }
      return table;
  }
  </code></pre>
  
  <p>the compiler doesn't show errors but when I run it there is segmentation fault in the "table[i][j].inside='.';" line and I don't know what I am doing wrong.
  I hope you understand what I mean and if someone could help it would be great!</p>