Home » C# Programming » Strings

Which of the following is the correct way to find out the index of the second 's' in the string "She sells sea shells on the sea-shore"?

Correct Answer: String str = "She sells sea shells on the sea-shore"; int i, j; i = str.IndexOf("s"); j = str.IndexOf("s", i + 1);

← Previous Question Next Question→

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion