title: How to initialize a structure that contains an array
body: <pre><code>#include &lt;stdio.h&gt;
  
  struct Name {char d[11]};
  
  int main (){
  
    char str[11];
    scanf("%s",str);
  
    struct Name new = {str};
  }
  </code></pre>
  
  <p>I want to initialize the Name structure new, but there is a warning: suggest braces around initialization of subobject.</p>
  
  <p>How can I put the char array I read in my Name structure?</p>