1.

Which of the following escape sequences placed at the end of a string makes the string a Null Terminated String?(a) ‘\p’(b) ‘\u’(c) ‘\0’(d) ‘\1’This question was posed to me during an interview.This intriguing question originated from String Manipulation topic in chapter Arduino Programming of Arduino

Answer»

Right answer is (c) ‘\0’

The explanation: The ‘\0’ when placed at the END of a string makes it a NULL terminated string which is simply a single DIMENSIONAL array of characters that are trailed by the ‘\0’ escape sequence. It is ALSO CALLED the ASCII NUL character.



Discussion

No Comment Found

Related InterviewSolutions