That's already a lot better, you're making progress :)
To find the length of the array you can do something like this: const int count=sizeof(array)/sizeof(int);
or, if your array is always of the same length: const int count=4;
( const
is optional in both cases, but I would recommend it in the second one) for (i=0;i<[B]=[/B]count;i++)
has to be: for (i=0;i<count;i++)
(otherwise you're overriding the array's bounds)
Now you've already the code to print out the whole array you've already completed 30% of your homework :P