title: Go through a 2 dimensional array in C
body: <p>I want to print a two dimensional array's value, one by one.
  But my code shows one item many times :(  </p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;conio.h&gt;
  
  void main()
  {
      char words[][5]={"Hiii","Hello"};
      int size;
      char *cp,*p;
      p=words;
      clrscr();
      printf("%p ",p);
      size=sizeof(words);
      printf("Size %d\n",size);
      for(cp=p;cp&lt;(p+size);cp++)
          printf("%s ",cp);
      getch();
  }
  </code></pre>
  
  <p>Expected o/p<br>
  Hiii<br>
  Hello</p>
  
  <p>Unexpected o/p<br>
  Hiii<br>
  iii<br>
  ii<br>
  i  </p>
  
  <p>Hello<br>
  ello<br>
  llo<br>
  lo<br>
  o  </p>