To check if COVID Social Distancing is applied or not in a classroom, a 2-D array of characters can be used to represent seating in a classroom as in the following example table. The valne 'X' in an element of the classroom array means that the seat is not occupied and any other value in an array element means that the seat is occupied. For example consider the following seating table A X H X X X I X K e X X J X E in the above table the element that violate the social distancing rule are H,n.a, I, e, K, E Write a C function named covid sd that checks if COVID Social Distancing is applied or not in a classroom. Your function must accept exactly three parameters named: classroom, num rows, and Ist. • The classroom parameter is a 2-D array of characters with 6 columns. This array represents the classroom seating. num rows is the number of rows in the 2D array, Ist is a 1-D array of characters. The size of Ist is 6 * num rows. o store the values of each seat that violates the COVID Social Distancing rule in the Ist array o return 0 if any seat violates the COVID Social Distancing rule and 1 otherwise

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 5GZ
icon
Related questions
Question
To check if COVID Social Distancing is applied or not in a classroom, a 2-D array of characters
can be used to represent seating in a classroom as in the following example table. The valne "X
in an element of the classroom array means that the seat is not occupied and any other value in an
array element means that the seat is occupied.
+For example consider the following seating table
A
X
H
X
X
I
X
e
K
b
X
X
J
X
E
in the above tahle the element that violate the social distancing rule are
H,n,q, I, e, K, E
Write a C function named covid sd that checks if COVID Social Distancing is applied or not in a
classroom. Your function must
o accept exactly three parameters named: classroom, num rows, and Ist.
The classroom parameter is a 2-D array of characters with 6 columns.
This array represents the classroom seating.
num rows is the number of rows in the 2D array,
Ist is a 1-D array of characters. The size of Ist is 6 * num rows.
o store the values of each seat that violates the COVID Social Distancing rule in the
Ist array
return 0 if any seat violates the COVID Social Distancing rule and
1 otherwise
Transcribed Image Text:To check if COVID Social Distancing is applied or not in a classroom, a 2-D array of characters can be used to represent seating in a classroom as in the following example table. The valne "X in an element of the classroom array means that the seat is not occupied and any other value in an array element means that the seat is occupied. +For example consider the following seating table A X H X X I X e K b X X J X E in the above tahle the element that violate the social distancing rule are H,n,q, I, e, K, E Write a C function named covid sd that checks if COVID Social Distancing is applied or not in a classroom. Your function must o accept exactly three parameters named: classroom, num rows, and Ist. The classroom parameter is a 2-D array of characters with 6 columns. This array represents the classroom seating. num rows is the number of rows in the 2D array, Ist is a 1-D array of characters. The size of Ist is 6 * num rows. o store the values of each seat that violates the COVID Social Distancing rule in the Ist array return 0 if any seat violates the COVID Social Distancing rule and 1 otherwise
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Fundamentals of Multithreaded Algorithms
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning