Exam SPLK-1004 All QuestionsBrowse all questions from this exam
Question 19

Which of the following are potential string results returned by the typeof function?

    Correct Answer: B

    The typeof function returns a string that represents the data type of the given variable. The correct possible results for typeof in many programming languages are typically 'number', 'string', and 'boolean' (or 'bool'). 'Null' is generally not a direct return type from the typeof function, and 'True, False, Unknown' are not type descriptors. Therefore, the most accurate possible results from the options provided are 'Number, String, Bool'.

Discussion
slayqueeenslayOption: B

Its B, Splunk Fundementals 3 page 58 says: typeof: returns a string that represents the data type of X – Possible results: number, string, or bool

adamscaOption: C

Ans is C C. Number, String, Null

poorisubashOption: C

The answer is C. C. Number, String, Null

DeragOption: B

Its B. The following example takes one argument and returns a string representation of its type. This example returns "NumberStringBoolInvalid"