Multiple choice technology programming languages

scan(string,n,) - returns the nth “word” in string

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The scan() function in SAS extracts the nth word from a string, using specified delimiters (default is space). It parses strings into tokens and returns the requested word.

AI explanation

The statement is TRUE. This describes the SCAN function as implemented in SAS: SCAN(string, n, ) returns the nth 'word' (token) in the string, where words are the pieces separated by the specified (or default) delimiter characters. The third delimiters argument is optional; when omitted, SAS uses a default set of delimiter characters. A negative n counts words from the right end. The signature and behavior in the question exactly match the documented SCAN function, so the assertion is correct. The marked answer 'True' is right.