Question
-Populate each element with random upper-case character & display to screen in programmer created function called function_1
-Traverse array to find horizontal pairs of characters in a programmer created function called function 2
-Traverse array to find vertical pairs of characters in a programmer created function called function3
-Display to the screen the number of horizon pairs and the number of vertical pairs in programmer created function called function 4
-Do not use strings
-Specify second dimension of a 2D array in the prototype and declaration header of any function in that passes a 2D array by address/reference
-Three identical characters in a row should be counted as 2 pairs
-Four identical characters in a row should be counted as 3 pairs, etc
Solution Preview
This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.
#include <stdio.h>#include <stdlib.h>
#define ROWS 12
#define COLS 15
void function1(char data[][COLS]); //Function prototypes
int function2(char data[][COLS]);
int function3(char data[][COLS]);
void function4(int horiz, int vert);
int main()
{
char data[ROWS][COLS]; //Declaration of array
function1(data); //Call First fucntion
function4(function2(data), function3(data)); //Call function 4 with function2 and 3 being called within
return 0;
}...