70.7k views
1 vote
Given a string (strWord) entered into an InputBox, what statement will always return the first letter of that string?

1. chrFirstLetter = chrFirstLetter.Chars(0)2. chrFirstLetter = strWord.Chars(0)3. chrFirstLetter = strWord.Chars = 04. chrFirstLetter = strWord.Chars(1)

User Bluu
by
3.4k points

1 Answer

4 votes

Answer:

Option 2. chrFirstLetter = strWord.Chars(0)

is the correct answer.

Step-by-step explanation:

  • strWord is the given string that will be entered by the user.
  • Chars() represent the characters of the string.
  • Chars(0) will extract the first word from the string because 0 is given as index to the string.
  • the first letter of the string when extracted will get stored into the variable chrFirstLetter.

All other option are wrong as they fetch the wrong result.

I hope it will help you!

User Asif Vora
by
3.8k points