title: A C Program for scanning and displaying the inputs of Cricketers using structures
body: <p>I had originally made this program to take 7 inputs 11 times, but then for the sake of simplicity, set it to 2.</p>
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;string.h&gt;
  
  struct Cricketers{
     char Name[50];
     int ranking;
     int age;
     char Country[30];
     int Num_of_matches;
     int Bating_avg;
     int Bowling_avg;
  };
  
  int main() {
  
     struct Cricketers arr[2];        
     int i;
     
      for(i=0; i&lt;2; i++)                             //For taking inputs 2 times
      {
          scanf(&quot;%s&quot;, arr[i].Name);
          scanf(&quot;%d&quot;, arr[i].ranking);
          scanf(&quot;%d&quot;, arr[i].age);
          scanf(&quot;%s&quot;, arr[i].Country);
          scanf(&quot;%d&quot;, arr[i].Num_of_matches);
          scanf(&quot;%d&quot;, arr[i].Bating_avg);
          scanf(&quot;%d&quot;, arr[i].Bowling_avg);
     }
      
  
      for(i=0; i&lt;2; i++)                           //For displaying the output
      {
          printf(&quot;%s&quot;, arr[i].Name);
          printf(&quot;%d&quot;, arr[i].ranking);
          printf(&quot;%d&quot;, arr[i].age);
          printf(&quot;%s&quot;, arr[i].Country);
          printf(&quot;%d&quot;, arr[i].Num_of_matches);
          printf(&quot;%d&quot;, arr[i].Bating_avg);
          printf(&quot;%d&quot;, arr[i].Bowling_avg);
      }
  
  return 0;
  
  }
  </code></pre>
  <p>There are no compilation errors but after taking just 2 inputs the first time, the program just finishes execution. The program is supposed to take 7 inputs, 2 times.</p>
  <p>After the execution finishes, this message appears:</p>
  <p>&quot;Process exited after 21.89 seconds with return value 3221225477
  Press any key to continue . . .&quot;</p>
  <p>Why the value &quot;3221225477&quot;?</p>