We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c992dc3 commit 757db57Copy full SHA for 757db57
0x14-bit_manipulation/2-get_bit.c
@@ -11,7 +11,7 @@ int get_bit(unsigned long int n, unsigned int index)
11
{
12
unsigned int i = 0;
13
14
- for (; i < index, (n != 1 || n != 0) ; i++)
+ for (; i < index && (n != 1 || n != 0); i++)
15
16
n >>= 1;
17
if (n == 0 && i)
0 commit comments