c 2b 2b print byte as bit

Solutions on MaxInterview for c 2b 2b print byte as bit by the best coders in the world

showing results for - "c 2b 2b print byte as bit"
Jacob
07 Apr 2016
1#include <bitset>
2...
3
4char a = -58;    
5std::bitset<8> x(a);
6std::cout << x << '\n';
7
8short c = -315;
9std::bitset<16> y(c);
10std::cout << y << '\n';