title: How to set value of all structure members at once?
body: <p>How can I set structure members using a single line of code?</p>
  
  <pre><code>typedef struct {
      int x;
      int y;
  }test;
  
  test obj[2];
  int main()
  {
  
   obj[0].x=0; //this works
   obj[0].y=0; //this works
   obj[0]={0,0};  //compilation error
  
  }
  </code></pre>