Don't forget to #include said:
int main(void)
{
int i[5] = { 16,56,124,54,511};
You can leave out the number ``5''. The compiler will automatically
determine the correct size of the array.
int j,k=1,l;
for(j=0;j>=0;k*=7,j+=k)
{
for(l=i[j];l>0;l>>=1)
{
putchar(l&1?'*':' ');
}
putchar(('\n'*01));
What's the purpose of the ``*01'' ?
The main problem (apart from the minor points mentioned above)
with this program is that is has undefined behaviour, because
you're reading an array outside its bounds. On my computer, the program
crashes almost immediately. Also, the assignment ``k*=7'' overflows
after a few iterations. The output becomes much more interesting if
you declare j and k as ``unsigned'', and replace the last assignment
in the control part of the outer for loop:
by
j = (j + k) % (sizeof i / sizeof *i)