title: Assignment from incompatible pointer type warning
body: <p>I am reading a book called "Advanced_C", and tried compiling the sample code "POINTERS.C".</p>
  
  <p>I have built and run it from codeblocks and also tried cc from linux, but I am getting a warning "assignment from incompatible pointer type".</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include&lt;string.h&gt;
  
  int main(void);
  
  int main()
  {
  
      int nCounter = 33;
      int *pnCounter = (int *)NULL;
  
      char szSaying[] =
      {
          "Firestone's Law of Forecasting: \n"
          "Chicken Little only has to be right once.\n\n"
      };
      char *pszSaying = (char *)NULL;
  
      printf(
          "nCounter | pnCounter | *(pnCounter) | pszSaying | "
          "szSaying[0] | szSaying[0-20]\n");
  
      printf("%8d | %8p | %8d | %8p | %c | %20.20s\n",
          nCounter,
          pnCounter,
          *(pnCounter),
          pszSaying,
          *(pszSaying),
          szSaying);
  
      printf("pnCounter = &amp;nCounter; \n");
          pnCounter = &amp;nCounter;
  
      printf("%8d | %8p | %8d | %8p | %c | %20.20s\n",
          nCounter,
          pnCounter,
          *(pnCounter),
          pszSaying,
          *(pszSaying),
          szSaying);
  
      printf("pszSaying = szSaying; \n");
          pszSaying = szSaying;
  
      printf("%8d | %8p | %8d | %8p | %c | %20.20s\n",
          nCounter,
          pnCounter,
          *(pnCounter),
          pszSaying,
          *(pszSaying),
          szSaying);
  
      printf("pszSaying = &amp;szSaying; \n");
      pszSaying = &amp;szSaying;
  
      printf("%8d | %8p | %8d | %8p | %c | %20.20s\n",
          nCounter,
          pnCounter,
          *(pnCounter),
          pszSaying,
          *(pszSaying),
          szSaying);
  
      printf("pszSaying = &amp;szSaying[0]; \n");
          pszSaying = &amp;szSaying[0];
          printf("%8d | %8p | %8d | %8p | %c | %20.20s\n",
          nCounter,
          pnCounter,
          *(pnCounter),
          pszSaying,
          *(pszSaying),
          szSaying);
  
      printf("*(pnCounter) = 1234; \n");
          *(pnCounter) = 1234;
  
      printf("%8d | %8p | %8d | %8p | %c | %20.20s\n",
          nCounter,
          pnCounter,
          *(pnCounter),
          pszSaying,
          *(pszSaying),
          szSaying);
      return (0);
  }
  </code></pre>
  
  <p>I'm new to C programming.</p>
  
  <p>Thanks!</p>