title: How to count how many times values were used in the array C?
body: <p>Here's my problem</p>
  
  <p>If certain number has been entered into an array I need that number to be displayed and occurrence of that number in the array.</p>
  
  <p>for example if user enters number 5 three times then "The number 5 has been entered 3 times so far" and so on</p>
  
  <p>Here's my code so far:</p>
  
  <pre><code>int i,j;
  int num_count = 0;
  
  for(i=0;i&lt;6;i++) {
      num_count = 0;
      for(j=1;j&lt;43;j++) {
          if( *(num + i) == j) {
              printf("The number %d has been used %d times\n",j,num_count);
          }//end if
      }//end inner for
  }//end outer for
  </code></pre>