User:Pooja Muralidhara

Hi All,

int a[100]; int i=0; void bin(long int n) { if(n>1) bin(n/2);
 * 1) include

printf("%d",n%2); a[i]=n%2; i++;

} main {	int j;	int count,count1; int b[100]; int k=0; bin(16897); printf("\n\nArray Contents:\n");

for(j=0;j<i;j++) {	//printf("%d",a[j]); if(a[j]==1) {		b[k]=j; k++; } } for(j=0;j<k;j++) {	printf("%d,",b[j]); }

}