title: How can I initialize all objects from a struct in C the way constructor initializes all class objects in C++?
body: <p>Let's say for example that I have defined a struct <code>emp_t</code>. Then, I want all employees (objects) created from that structure to have ID = 0, name = &quot;Empty string&quot;, and salary = 0. Is this possible?</p>
  <pre><code>struct employee
  {
      int id;
      char name [30];
      int salary;
  };
  typedef struct employee emp_t;
  </code></pre>