The article is written in ISO C90
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
/* Find the greatest power of two that is a divisor of a signed integer in two's-complement form */

#include <stdio.h>

int grtwo(int x)
{
	/* assuming two's-complement implementation of int */
	return x & -x;
}

int main(void)
{
	printf("The greatest power of 2 that is a divisor of 100 is %d\n", grtwo(100));
	return 0;
}