title: decimal to 8 bit binary conversion in c++
body: <p>I am working on decimal to binary conversion. I can convert them, using 
  char bin_x [10];
    itoa (x,bin_x,2);
  but the problem is, i want answer in 8 bits. And it gives me as, for example x =5, so output will be 101, but i want 00000101. 
  Is there any way to append zeros in the start of array? or is it possible to get answer in 8 bits straight away? I am doing this in C++</p>