Question 35:
The following SAS program is submitted:
data work.test;
First = 'Ipswich, England';
City_Country = substr(First,1,7)!!', '!!'England';
run;
Which one of the following is the length of the variable CITY_COUNTRY in the output data set?
- 6
- Get all Questions and Answer from here
- You need to have paid subscription to access all questions
- Thanks for considering SAS Certification Material
Correct Answer : 4
Exp : By default the variable length is determined by the length of the first argument for substr.
So here we have 16 + 2(', ') + 7('England') = 25
In SAS programming, the concatenation operator is a pair of vertical bars (||).
You can access to full explanation to question and answer from this page.