>>268
char*bitpart(int x,char *bit)
{
int b;
bit[32] = '\0';
for(b=31;b>=0;b--){
sprintf(&bit[31-b],"%d",(x>>b)&1);
}
return bit;
}