title: Preferred way of typecasting basic types in C++
body: <p>Out of below 2 typecasting which one is preferred/better to use in a C++ code and why ?</p>
  
  <pre><code>unsigned char var = 10;
  unsigned int value;
  value = static_cast&lt;unsigned int&gt;(var);   //typecasting 1 
  value = (unsigned int)var;                //typecasting 2
  </code></pre>