Answered step by step
Verified Expert Solution
Question
1 Approved Answer
pleae note that you should Write a recursive function that accepts as input the indices of a particular cell and returns the size of the
pleae note that you should Write a recursive function that accepts as input the indices of a particular cell and returns the size of the blob containing the cell. , and . Use only pointer offset notation when writing your program.
please just use this header #include
in C programing languge please
Blob Counter: We have a two-dimensional grid of cells, each of which may be empty or filled. The filled cells that are connected form a "blob. There may be several blobs on the grid. Write a recursive function that accepts as input the indices of a particular cell and returns the size of the blob containing the cell. There are three blobs in the sample grid below. If the function parameters represent the X and Y indices of a cell, the result of BlobCount(matrix, 2, 3) is 0; the result of BlobCount(matrix, 0, 1) is 5; the result of Blobcount(matrix, 4, 4) is 4; the result of BlobCount(matrix, 3, 0) is 2 0 4 ALGORITHM IL cell (X, Y) is not in the array then Else if cell (X,Y) is empty then Else Return a count of 0 Return a count of 0 Mark cell (&Y) as empty Add 1 and see whether the blob contains any of the eight neighbors of cell (XY) Using pointers to a matrix, write a program to read a 5x5 matrix from the user containing stars and dots. Stars represent the blob and the dots represent empty spaces. After you have finished entering the matrix, input a point on the grid (x, v). Find and print the number of cells that form a blob at the point entered. You may use the grid above as an example. Use only pointer offset notation when writing your programStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started