Implement the function void Build_A_List(Str30 dest[], Str30 source [][COLSIZE], int length, int *pCount) which will copy all strings with a string length equal to parameter length. The function should also update *pCount which will store the number of strings copied from source[][] to dest[] array. Code format    TO DO #3: Implement function Build_A_List().    DO NOT use printf() in the function definition.    */ void Build_A_List(Str30 dest[], Str30 source[][COLSIZE], int length, int *pCount) { // write code here } */

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

I need help in this question in C program.

Consider a 2D array of strings based on the following declarations/definitions: 

#define ROWSIZE 4
#define COLSIZE 3
typedef char Str30[31];
Str30 Words[ROWSIZE][COLSIZE]; // 2D array of string

An example Words[ ][ ] array is shown below.

 

  col0 col1 col2
row0 dOg Neko Cat
row1 Hello gOoDbYE WELCOME
row2 GREEN CauliFlower Blue
row3 Code Programmer SynTaX

Implement the function void Build_A_List(Str30 dest[], Str30 source [][COLSIZE], int length, int *pCount) which will copy all strings with a string length equal to parameter length. The function should also update *pCount which will store the number of strings copied from source[][] to dest[] array.

Code format

   TO DO #3: Implement function Build_A_List().
   DO NOT use printf() in the function definition.   
*/
void Build_A_List(Str30 dest[], Str30 source[][COLSIZE], int length, int *pCount)
{

// write code here

}

*/

Example #1: Build_A_List(dest, Words, 4, &count); // where Str30 dest[MAXSIZE * COLSIZE]
The resulting dest[] array that contains all the words with a string length of 4 copied in row major order is shown below. The value
of count = 3

Neko
Blue
code

Example #2: Build_A_List(dest, Words, 88, &count);
The resulting dest[] array will not contain any word since there is no word in source[][] that has a string length of 88. The value of count = 0. 

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-engineering and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY