title: defining a string value for structure variable
body: <p>I was just going through certain interview questions. Got this structure related issue, I m not understanding what is happening wit the output, Please if some could explain the reason.</p>
  
  <p>When is use a character pointer in the structure like </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  struct name {
      char *array;
  }variable;
  
  int main( int argc, char * argv[] ){
  
      variable.array="hello";
      printf( "%s\n", variable.array );
  }
  </code></pre>
  
  <p>The output is <code>hello</code> printed, but when change the structure variable to </p>
  
  <pre><code>struct name {
      char array[10];
  }variable;
  </code></pre>
  
  <p>The compiler throws an error "incompatible types in assignment" at </p>
  
  <pre><code>variable.array="hello";
  </code></pre>
  
  <p>I am really confused as to where i am missing the point. Why does it show the error like assignment problem?? Please correct me
  Thank you</p>