//Write a program in C# Sharp to search the position of a substring within a string. Not able to get the output and proceed further.... pls help
string sentence = Console.ReadLine();
foreach (string item in sentence)
{
Console.WriteLine(item);
}
int pos = 1;
Console.WriteLine("Enter the substring");
string substring = Console.ReadLine();
char[] substringchar = substring.ToCharArray();
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Ashok KumarPosted Jan 22, 2018, 6:46 AM