title: Practicing pointers, how do I get rid of this warning?
body: <p>How do I get rid of this warning? I <em>think</em> it functions correctly but I'm not sure. I'm new to programming and want to practice more on pointers. I am coding a program that takes the current memory address of variableName[i] and prints it with the correct offset calculating the size of the string variableName contains.</p>
  
  <pre><code>cc     testing.c   -o testing
  testing.c: In function ‘main’:
  testing.c:10:6: warning: assignment to ‘int *’ from 
  incompatible pointer type ‘char (*)[15]’ [-Wincompatible- 
  pointer-types]
  ptr = &amp;variableName;
       ^
  </code></pre>
  
  <p>Code is below:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  #define TESTING 15
  
  int main()
  {
  
      char variableName[TESTING] = "Hello World";
      int *ptr, stringSize, inc;
      ptr = &amp;variableName;
      inc = *ptr;
      stringSize = sizeof(variableName);
      for (int i = 0; i &lt; 5; i++) {
          inc = inc + stringSize;
          printf("variableName[%d]: '%s'\t0x%x\n", i, variableName, inc);
      }
      printf("\nAddress to Pointer *ptr: 0x%x\n", *ptr);
      return 0;
  }
  </code></pre>
  
  <p>Thank you very much!</p>