Heres the problem, Ill try my best to explain this: If your given a 5x5 array whicih looks like:

1 1 1 1 1

0 1 1 1 1

0 0 1 1 1

0 0 0 0 1

0 0 0 0 0

Basically in each column below any 1 is a set of zeros. What they want us to do is create a new array which will store the position where u hit ones in each ROW. For the example above it would be like

1

2

3

5

6 (if its all zeroes then we just assume after 6 zeros it would hit a 1)

So this array (1,2,3,5,6) would be printed on the screen. Any idea how i would do this? This is a sample midterm question which is not worth any marks so please if you can put any code watsoever will help.