#include<iostream>
#include<cstdio>
using namespace std;
void printBinary(char x);
int main() {
char a[5] = "poiu";
for (int i = 0;i < 4;i++) {
printBinary(a[i]);
cout<<endl;
}
return 0;
}
void printBinary(char x) {
char m = x;
for (int i = 0;i < 8;i++) {
cout << (bool)(x & 0x80);
x = x << 1;
}
}
输出: