title: Read/Write a single byte of a void* variable
body: <p>If I have </p>
  
  <pre><code>void *temp = malloc(128);
  memset(temp, 0 , 128);  
  </code></pre>
  
  <p>And I want to read the first byte alone, following is what I'm doing. </p>
  
  <pre><code>char a[2];
  strncpy(a, (char*)temp, 1);
  int p = a[0];
  //p will be zero in this case
  </code></pre>
  
  <p><strong>Q1.</strong> I'm sure there is a more elegant way to achieve the same. If so, what would it be?</p>
  
  <p><strong>Q2.</strong> Is there a way I can alter the value of that single byte alone?</p>
  
  <p>Say I want the first byte to have the value equivalent to the int value 48 (i.e. 00110000)
  How would I do that?
  I was able to make no progress with the write.</p>