title: someone explain me how to count the number of element in array using pointer
body: <p>this is code will print the first non repeated character in string.i had doubt in first while loop.explain me what while loop is doing.</p>
  <pre class="lang-c prettyprint-override"><code>#include&lt;stdio.h&gt;
  
  
  int main()
  {
      char str[]=&quot;zoho&quot;;
      int count[256]={0},i=0;
      char *p=str;
      while(*p)
      {
          ++count[*p++];
          printf(&quot;%d&quot;,count[i++]);
      }
      p=str;
      while(*p){
          if(1==count[*p]){
              printf(&quot;The first character is :%c&quot;,*p);
              break;
          }
          p++;
      }
      return 0;
  }
  </code></pre>