title: Justdoing some data structures examples
body: <p>question -: Suppose a company keeps a linear array YEAR(1950:1960) such that YEAR[K]contains no of babies born in  year K. Write a program to  perform following tasks.
  a. To print each year in which no baby was born.
  b. To find number of years in which no baby was born</p>
  <p>MY Answer:-</p>
  <pre><code>#include &lt;stdio.h&gt;
  
  void main()
  {
      int year[10],k,count=0;
      printf(&quot;Enter the elements of the array from 1950 to 1960\n&quot;);
      for(k=1950;k&lt;1960;k++)
      {
          scanf(&quot;%d&quot;,&amp;year[k]);
      }
      printf(&quot;Entered values of the year from 1950 to 1960 are\n&quot;);
      for(k=1950;k&lt;1960;k++)
      {
          if(year[k]==0)
          {
              printf(&quot;%d&quot;&quot; year have number of babies born %d\n&quot;,k,year[k]);
              count = count+1;
          }
      }
      printf(&quot;Total number of year where no baby born is %d\n&quot;,count);
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/VKzm4.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>I DUNNO WHY IT AINT WORKING PLS HELP</p>