Using the declarations
write a function
that returns how many words w of the Matrix m have the character c at the position k, that is, fulfil p[k] = c (when p[k] exists). Take into account that the “matrix” m is not necessary rectangular, i.e., some rows may be larger than others.
k ≥ 0
Observation You only need to submit the required procedure; your main program will be ignored.