Re: for and arrays




"Ben Bacarisse" <ben.usenet@xxxxxxxxx> wrote in message
news:87tzeh1rbu.fsf@xxxxxxxxxxxx
"Bill Cunningham" <nospam@xxxxxxxxx> writes:

I understand this code.

int a[5];
int b;
for (b=0;b<5;b=b+1)
int a[b];

Did you try?

Well I tried and it compiled with no errors. Or atleast compiled anyway.
Yes this is an excercise to learn. All I do is an excercise to learn. What
if one had an array of 500 ints and had the simple task of setting them
1-500? How's this for another take.

int a[10];
int b;
for (b=0;b<10;b++) {

a[ b=b+1];
}


Bill


.