title: void* vs. char* pointer arithmetic
body: <p>I'm looking through my textbook and I'm a little confused about some of the code that is in there. In one part, they are performing pointer arithmetic in the following way:</p>
  
  <pre><code>void* bp;
  ...
  bp = (void*)((char*)(bp)+16);
  ...
  </code></pre>
  
  <p>but later on, they do the following:</p>
  
  <pre><code>void* bp;
  ...
  bp = bp+16;
  ...
  </code></pre>
  
  <p>I feel like they should be two different things but they are treating it like the same thing.
  I feel this way because, for example, if you were to do an array access (for an integer array for example),you would do the following</p>
  
  <pre><code>int* a = malloc(n*sizeof(int));
  ...
  q = *(a+1);
  ...
  </code></pre>
  
  <p>in this case, aren't I accessing the next 4 bytes in the integer array and not the next byte?
  Similarly, I feel that if I have void* a, then *(a+1) should be the next 4 bytes...
  Or is that not the case?
  Thank you.</p>