azarutz
Member level 2
- Joined
- Mar 4, 2012
- Messages
- 42
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 1,288
- Location
- India
- Activity points
- 1,579
Hi ,this is a part of decimal to binary conversion program and i can't understand the statement inside for loop some body explain me .
this is 32-bit binary output program . so c initialized to 31 .
Code:
for (c = 31; c >= 0; c--)
{
[COLOR="#FF0000"] k = n >> c[/COLOR];
if (k & 1)
printf("1");
else
printf("0");
}
this is 32-bit binary output program . so c initialized to 31 .