The function must accept a 2D array as a parameter, then fill this 2D array using what is read in from the file.
If you read a 0, -1 or 999 then store it as a 0, -1 or 999 respectively in the array. However if a 9 is read in then we will generate a random number between 1 and 7 to store in the array instead. So for example if the following row is read in from the file: 0 0 -1 0 9 -1 0 9 0 0
Then it may be stored in the array like so:
0 0 -1 0 4 -1 0 2 0 0
Nothing much, int array[10][10];
100, continous blocks of memory are allocated for array(each block is of size of int), in case the 100 continuous blocks are not available it throws a memory alloc exceprtion.
If there isn't enough memory on the stack, that will likely cause your program to crash, but it won't throw an exception; and it's one contiguous block of memory with space for 100 elements.
@OP: If you don't attempt to solve this on your own, you're unlikely to get constructive responses. Show code.