That's not a good way to look at the problem. Because of all the extra code, you have too much to look at. On top of that your indention is off, making it even harder.

Here's the basic setup, probably more than I should give, but hopefully it makes things clearer:

Code:
#define ROW     4
#define COLUMN  7

int Matrix[ROW][COLUMN] = { {1, 2, 3, 4, 5, 6, 7},
                            {5, 6, 7, 8, 9, 1, 4},
                            {4, 9, 7, 4, 1, 3, 2},
                            {3, 2, 5, 5, 5, 9, 1} };

int main()
{
    int i;
    int j;
    for( i = 0; i < ???; i++ )
    {
        for( j = 0; j < ??? j++ )
        {
            /* do stuff */
        }
    }
}
That is much easier to read with proper indenting.