Introduction To Programming

Why programs ? Programming is nothing but making the computers think the same way a human thinks. Programs are made for obtaining a specific solution which can even be solved by humans which when solved by us may consume time..

Wednesday, August 11, 2010

Produce 2 power n series using bitwise operator

I am printing 2n series up to 210

int main()
{
int i;
for(i=0;i<10;i++)
printf("%d\n",1<<i);

return 0;
}

This will be the output of the above code

1
2
4
8
16
32
64
128
256
512