Question: C Programming. Write a prograrm that generates a random walk across a 10 10 array. The array will con- tain characters (all ' . '

C Programming.
Write a prograrm that generates a "random walk" across a 10 10 array. The array will con- tain characters (all ' . ' initially). The program must randomly "walk" from element to ele- ment, always going up, down, left, or right by one element. The elements visited by the program will be labeled with the letters A through Z, in the order visited. Here's an example of the desired output: 9. BCD.. F E. H G KR S T U V Y N O Hint: Use the srand and rand functions (see deal.c) to generate random n After generating a number, look at its remainder when divided by 4. There are four possible values for the remainder-0, 1, 2, and 3-indicating the direction of the next move. Before performing a move, check that (a) it won't go outside the array, and (b) it doesn't take us to
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
