Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Which of these methods of the class String is used to obtain length of String object?

a) get()
b) Sizeof()
c) lengthof()
d) length()

Answer: d
Explanation: Method length() of string class is used to get the length of the object as string. Length and hence invokes the length() method.

Join The Discussion