title: What is the best way to set a particular bit in a variable in C
body: <p>Consider a variable <code>unsigned int a;</code> in C.</p>
  
  <p>Now say I want to set any i'th bit in this variable to '1'. </p>
  
  <p>Note that the variable has some value. So <code>a=(1&lt;&lt;i)</code> will not work. </p>
  
  <p><code>a=a+(1&lt;&lt;i)</code> will work,but I am looking for the fastest way. Anything??</p>