title: error: incompatible types when assigning to type 'char[20]'
body: <p>The code:</p>
  
  <pre><code>struct
  {
      char firstname[10];
      char lastname[10];
      char passfail[20];
      int score;
  }student_mark;  
  
  /*Get student details*/
  
  printf("Hello user, please enter your forename\n");
  scanf("%s", student_mark.firstname);
  
  printf("\n..and your surname?\n");
  scanf("%s", student_mark.lastname);
  
  printf("\n\nHow about your mark out of 10 for the year?\n");
  scanf("%d", &amp;student_mark.score);
  
  if (student_mark.score &gt;= 8)
      {
          student_mark.passfail="DISTINCTION\n";
      }
  else if (student_mark.score &gt;= 6)
      {
          student_mark.passfail="PASS\n";
      }
  else if(student_mark.score &lt;=5)
      {
          student_mark.passfail="FAIL\n";
      }
  
  printf("First name = %s\n", student_mark.firstname);
  printf("Last name = %s\n", student_mark.lastname);
  printf("Achieved: = %s\n", student_mark.passfail);
  
  return 0;
  }
  </code></pre>
  
  <p>When I run this code, it gives me the warning: incompatible types when assigning to type <code>char[20]</code> from type <code>char * student_mark.passfail="DISTINCTION\n";</code></p>
  
  <p>Why is this?</p>