C#: Check if a string starts with a specified word
Check String Starts with Word
Write a C# program to check if a string starts with a specified word.
Note: Suppose the sentence starts with "Hello"
Sample Data: string1 = "Hello how are you?"
Result: Hello.

Sample Solution:-
C# Sharp Code:
Sample Output:
Input a string : Hello how are you? True
Flowchart:

C# Sharp Code Editor:
Previous: Write a C# program to check if a given positive number is a multiple of 3 or a multiple of 7.
Next: Write a C# program to check two given numbers where one is less than 100 and other is greater than 200.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics