how do i read input from a file into a 2D array,
the file is in the format..
5 6
101010
101010
101010
101010
101010
where 5 denotes 5 rows and 6 denotes 6 columns.I need to read it all into a 2D array but With one major requirement
the instead of 5rows and 6 columns i should have a matrix of 7rows and 8 columns with the array holding values as this
11111111
11010101
11010101
11010101
11010101
11010101
11111111
i.e i hav to fill the first row ,last row,first column and last column all with 1's