A matrix of characters schematically represents a swamp. The swamp is composed of muddy areas, represented with the ‘.’ character, and rocky areas, represented with the ‘’ character. The matrix size can be defined using #define, however it should be no greater than 25 rows and 80 columns.
Example of swamp:
Write a C program that searches a path in the swamp, from the left to the right, without jumps, only including consecutive rocky areas. Suppose that each rocky area can have at most one other rocky area on its right (there are no branches), i.e., either on the same row, or in the previous row, or in the following one. The program shall print the row sequence of the path (the columns are implicit – there shall be a rocky area for each column), or report that no path exists.
For example: in picture
Path: 2 3 4 3 4 3 2 3 4 3 4
Hint: in a preliminary version, use a predefined matrix of strings and test the program; then modify the program and read the swamp from the keyboard input (in the future it would be possible to read it from a file).