title: What is the correct way to offset a pointer?
body: <p>I want to pass a pointer to a function. I want this pointer to point to some place in the middle of an array. Say I have an array like such <code>unsigned char BufferData[5000];</code>, would the following statement be correct syntactically? </p>
  
  <pre><code>writeSECTOR( destAddress, (char *)( BufferData + (int)(i * 512 )) );
  // destAddress is of type unsigned long
  // writeSECTOR prototype: int writeSECTOR ( unsigned long a, char * p );
  // i is an int
  </code></pre>