title: Why would you use a void pointer in this code?
body: <pre><code>#include &lt;iostream&gt;
  using namespace std;
  int main()
  {
      char *pc; 
      int *pi;
      double *pd;
  
      pc = (char *)10000;         
      pi = (int *)10000;          
      pd = (double *)10000;           
      // 1)
      cout &lt;&lt; "before pc = " &lt;&lt; (void *)pc &lt;&lt; " pi = " &lt;&lt; pi &lt;&lt; " pd = " &lt;&lt; pd &lt;&lt; endl;
  
      pc++;
      pi++;
      pd++;
      // 2)
      cout &lt;&lt; "after increase pc = " &lt;&lt;  (void *)pc &lt;&lt; " pi = " &lt;&lt; pi &lt;&lt; " pd = " &lt;&lt; pd &lt;&lt; endl;
  
      return 0;
  }
  </code></pre>
  
  <p>In this code(1, 2), why is variable <code>pc</code> cast to a void pointer?</p>
  
  <p>I am checking that a run-time error does not occur if you do not print the variable <code>pc</code>.  </p>