IntToBinaryString
void IntToBinaryString(int devisor,char* pBinStr) { int i; int remainder; for(i=0;i<8;i++) { remainder=devisor & 0x01; devisor=devisor >> 1; pBinStr[i]=(remainder == 1)?'1':'0'; } pBinStr[8]='\0'; } void main() { int x=0xc3; char action[9]; IntToBinaryString(x,action); printf("%s\n",action); } /* 11000011 Press any key to continue */