Question: Write a function that takes two arguments, both strings. Print YES if the second string argument contains only characters found in the first string argument.

Write a function that takes two arguments, both strings. Print "YES" if the second string argument contains only characters found in the first string argument. Print "NO" if the second string argument contains characters not in the first. Here are some sample calls. In your program, call the function 3 times with the same arguments shown below.

makeStr("hello", "")

makeStr("hello", "olleloheloeloheloel")

makeStr("hello", "olleloheloteloheloel")

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 Databases Questions!