[amp_mcq option1=”the name of the string” option2=”the first character in the string” option3=”the length of the string” option4=”the name of the array holding the string” correct=”option2″]
The correct answer is: B. the first character in the string.
A string is a sequence of characters. The first element in a string is the first character in the sequence. For example, in the string “Hello”, the first element is the letter “H”.
Option A is incorrect because the name of the string is not an element of the string. The name of the string is a variable that refers to the string.
Option C is incorrect because the length of the string is not an element of the string. The length of the string is a property of the string.
Option D is incorrect because the name of the array holding the string is not an element of the string. The name of the array holding the string is a variable that refers to the array.