How to swap content of void pointers?
<p>I'm making a function which receives array of any datatype and reverse it elements.</p>

<pre><code>void f(void *p, int size)
{
  for(int i=0; i&lt;=size/2; i++)
  {
    swap(p+i, p+size-i-1);
  }
}
</code></pre>

<p>but problem is how can i implement swap function which swap their content without dereferencing void pointers?</p>
