title: How to print string which is passed from 2d array using pointer to an array?
body: <p>Hello How to print string which is passed from 2d array to function called print_2d and
  in that  function i am catching base address of 2d array which has string as its element</p>
  
  <p>now with pointer to an array now i want to print the string using pointer to an array? 
  my code is below</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  void print_2d(char (*p)[10],int r) // i am catching with pointer to an array
  {
      int i;
      for(i=0;i&lt;r;i++)
      printf("%s",*p[i]); //segmentation fault why?
                              // how to print then?
  }
  
  main()
  {
      char *s[10]={"one","two","three","four"};
      int r;
      r=sizeof(s)/sizeof(s[0]);
      print_2d(s,r);
  }
  </code></pre>