Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The first function readNames will populate the 2d array with C-strings. * The function will have arguments for the number of * rows and number

The first function readNames will populate the 2d array with C-strings.

* The function will have arguments for the number of * rows and number of columns in the 2d grid. The function will then read * the strings (including whitespace) storing them in columns first. *

void readNames(char myChart[10][10][15], int numRows, int numCols)?

* The next function, printChart, prints the 2d array of c-strings nicely as a * table, making sure columns line up. Each row on the screen should correspond * to each row in the seating chart.

void printChart(char myChart[10][10][15], int numRows, int numCols)??

* Third Function * your function should return the number of names in the entire chart * _________{PART 1} _______ (10 points) * AND create a 1-d array that * holds the average length of the names per ___{PART 2} ____ (a 1-d array of * doubles) (10 points). * length will be provided by the user and should be requested to be entered * in main and passed to the function. The results from the function should * then be displayed by main

Part 1: that are less length

Part 2: average over rows ***************************************************************************/ int thirdFunction(char myChart[10][10][15], int numRows, int numCols, int length, double values[10]) {?

How would I do both functions? I'm just confused on that. In C

in main it should have:

int main() { char ourRoom[10][10][15]; // largest chart we will need double results[10]; // for thirdFunction results

// place code here for your header

// place code here for reading in number rows, number columns, and // code that makes sure the rows and columns are always less than 10 and // also code that calls your three functions appropriately

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions