title: What is the difference between char **ptr and char *ptr[] in C?
body: <pre><code>#include&lt;stdio.h&gt;
  void display(int n, char *str[])
  {
    int i=0;
    while(i&lt;n) printf("%s ",str[i++]);
  }
  int main()
  {
    display(1,"Hello");return 0;
  }
  </code></pre>
  
  <p>when I run this above code I get warnings as</p>
  
  <pre><code>    arr.c: In function 'main':
      arr.c:11:12: warning: passing argument 2 of 'display' from incompatible         pointer
      type
      display(1,"hello");
              ^
      arr.c:3:6: note: expected 'char **' but argument is of type 'char *'
      void display(int n,char *str[])
  </code></pre>
  
  <p>But then how is it different from</p>
  
  <pre><code>    int main(int argc, char * argv[])
  </code></pre>
  
  <p>And what is the difference between </p>
  
  <pre><code>    char **argv and char *argv[] 
  </code></pre>
  
  <p>I am strictly not asking about something like char *argv[100]</p>