Computer Science, asked by josnajosd, 2 months ago

st= "8.374"
Find char P=
st.char At(1)​

Answers

Answered by anindyaadhikari13
2

\texttt{\textsf{\large{\underline{Answer}:}}}

  • P = '.'

\texttt{\textsf{\large{\underline{Explanation}:}}}

  • Method charAt(x) extracts the character present in the string at index x.
  • Here, the character at second index is a dot. So, p = '.'
  • Note that index value starts with 0. So, the character at index 1 is the second character of the string which is a dot.
Similar questions