Computer Science, asked by shahhsana, 3 months ago

Write a program to create two Threads. 1
st Thread printing first character of
each word in the sentence entered by the user and using same input of 1st Thread
in 2nd Thread to print each 2nd character of the sentence entered, after a period of
1 sec. Input from Thread A to be passed to Thread B and ensure that Thread A
gets executed completely first.

Answers

Answered by mamatabari81
2

Explanation:

Print the string after the specified character has occurred given no. of times

Given a string, a character, and a count, the task is to print the string after the specified character has occurred count number of times.Print “Empty string” in case of any unsatisfying conditions.(Given character is not present, or present but less than given count, or given count completes on last index). If given count is 0, then given character doesn’t matter, just print the whole string.

Similar questions