1.

Function replace() accepts _____________ arguments.(a) 1(b) 2(c) 3(d) 4I got this question in semester exam.Enquiry is from String Class in chapter Inbuilt Classes of Object Oriented Programming

Answer»

The correct option is (b) 2

The explanation is: The first argument is the target CHARACTER. This target character will be REPLACED by another character. The NEW character is the SECOND argument to the function. Only the characters can be passed as argument, not a string.



Discussion

No Comment Found

Related InterviewSolutions