Multiple choice technology programming languages

The SAS program is submitted:

data combine;  
country='Italy, Russia, ireland';  
found=find(country,'i');  
run;

What is the value of the variable found in the output data set?

  1. 1

  2. 12

  3. Ireland

  4. Italy

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

The FIND function in SAS searches for a substring and returns the starting position. In 'Italy, Russia, ireland', searching for 'i' finds the first occurrence at position 12 (the 'i' in 'ireland'). FIND is case-sensitive by default, so it skips the 'I' in 'Italy' at position 1. The return value is a position number, not the matched string.