Question: Character array colorName and character searchChar are assigned with a name and a character read from input. Output Added to list 1 if searchChar

Character array colorName and character searchChar are assigned with a name and a character read from input. Output "Added to list 1" if searchChar does not exist in colorName, and "Added to list 2" otherwise. End with a newline.
Click here for examples
Ex 1: If the input is:
thistle
J
then the output is:
Added to list 1
Ex 2: If the input is:
mustard
r
then the output is:
Added to list 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!