title: C - Execv - incompatible pointer type
body: <p>So what I'm trying to do is to send a simple ping command through Execv and print on terminal.</p>
  <p>I have on my original problem an array of strings of unknown arguments. a[n][50] that is going to be filled throughout the execution of the process, accordingly to user input.
  I cant manage to use &quot;execv&quot; , I keep receiving &quot;incompatible pointer type&quot;.
  Trying to illustrate the problem, I did only a simple &quot;ping&quot; &quot;google.com&quot;</p>
  <pre><code>int main(int argc, char const *argv[])
  {
  
      //That's what I have...
      char a[3][50];
      strcpy(a[0], &quot;ping&quot;);
      strcpy(a[1], &quot;google.com&quot;);
      
      //First try
      a[2] = NULL;
      execv(a[0], a);    
      
      //Second time, trying to fix, also didnt work 
      char *pointer[3];
      pointer[0] = a[0];
      pointer[1] = a[1];
      pointer[2] = NULL;
  
      execv(pointer[0], pointer);
  
      return 0;
  }
  </code></pre>
  <p>Is there any workaround without having to change the a[n][50] format to save strings?</p>