1.

Which of these methods of the class String is used to obtain length of String object?(a) get()(b) Sizeof()(c) lengthof()(d) length()The question was asked in an online interview.My question is from Operation on Characters in section Arrays and Strings of C#

Answer»

Correct OPTION is (d) length()

To EXPLAIN I would say: METHOD length() of string class is used to get the length of the object as string. Length and hence INVOKES the length() method.



Discussion

No Comment Found

Related InterviewSolutions