Thursday, September 24, 2009

Bit Count C Program

void main()
{
int x,b,c;
clrscr();
x=10;
for(c=0;x!=0;x=x>>1)
{
if(x&01)
++c;
}
printf("%d",c);
getch();
}

0 comments:

Post a Comment