title: I am getting an error "warning: assignment to 'char' from 'char *' makes integer from pointer without a cast"
body: <pre><code>struct student {
      char name[30];
      char rollNumber[20];
      char class[2];
  };
  
  void test(int length){
      struct student* tempStudent = (struct student*)malloc((length+1)*sizeof(struct student));
      *tempStudent[0].name = &quot;Hello&quot;;
      printf(&quot;%s&quot;, *tempStudent[0].name);
  
  }
  
  void main(){
      test(1);
  }
  </code></pre>
  <p>When I try to run the above code, I get a warning &quot;warning: assignment to 'char' from 'char *' makes integer from pointer without a cast&quot; and the output as &quot;(null)&quot;. What am I doing wrong?</p>