1.

What is the return type of the substr() function?(a) int(b) long(c) byte(d) stringI got this question during an online interview.This is a very interesting question from String Manipulation in portion Arduino Programming of Arduino

Answer»

Right answer is (d) string

Easy explanation: The substr() FUNCTION is USED to return a PORTION of a given string. It accepts 2 inputs as arguments; the lower and UPPER INDEXES. It can be used as “str.substr(a,b);” where a is the lower index and b is the upper index.



Discussion

No Comment Found

Related InterviewSolutions