Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in C please 1-Write a C program to find the R, G, and B letters in a char data type array. You can initialize the

in C please image text in transcribed
1-Write a C program to find the R, G, and B letters in a char data type array. You can initialize the array with any letters at the beginning of the code but it must contain at least one occurrence of all the R, G and B letters. If the letters are detected, the red, green, and blue colors LEDs will turn on, respectively. Your program should count the number of occurrences of each letter in the array. 2-Write a C program to detect a specified pattern among three distinct pattern entries in a char data type array for eg. "AAA", "BB" and "CCC" or "RED", "GREEN" and "BLUE". The array is to be saved as eg. "AAA BB CCC BB CCC AAA AAA CCC BB" or "RED RED GREEN BLUE GREEN RED BLUE BLUE". When the pattern is detected (AAA or RED or any one of the other patterns you choose), the green color LED will turn on. If the pattern is not detected, the red color LED will turn on at the end of the program. Your program should count the number of occurrences of the pattern as well

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

Relational Database And Transact SQL

Authors: Lucy Scott

1st Edition

1974679985, 978-1974679980

More Books

Students also viewed these Databases questions