filling an array issue

It should be N elements, if N were declared first.