title: BitSet Printing in C
body: <p>So, here is my code:
  <a href="http://pastebin.com/MejYmpvK" rel="nofollow">http://pastebin.com/MejYmpvK</a></p>
  
  <p>I'm trying to get the output to display this:</p>
  
  <pre><code>The BitSet is:
  0000000001001010
  
  Modified BitSet at index '14' = '1' is:
  0010000001001010
  
  The value at index '14' is:
  1
  
  Modified Bitset at index '14' = '0' is:
  0000000001001010
  
  The value at index '14' is:
  0
  </code></pre>
  
  <p>However, it is giving me this output instead:</p>
  
  <pre><code>The BitSet is:
  0000000001001010
  
  Modified BitSet at index '14' = '1' is:
  0010000001001010
  
  The value at index '14' is:
  0
  
  Modified Bitset at index '14' = '0' is:
  0000000001001010
  
  The value at index '14' is:
  0
  </code></pre>
  
  <p>Everything is working perfectly except for the display method. Not sure what is going on here (the whole code is in the pastebin link above):</p>
  
  <pre><code>/* Returns the value of the bit at 'index' */
  int bitValue(bitSet bs, int index){
  
      /* Shifts right to the passed index value */
      int value = ((bs &amp; (int)pow(power, index)) &gt;&gt; index);
  
      return value;
  }
  </code></pre>