SAS Base, A00-211 Crambible 

SAS 베이스 자격증 


QUESTION NO: 46


Given the contents of the raw data file TYPECOLOR: 

----I----10---I----20---I----30
Daisyyellow

The following SAS program is submitted:


data flowers;
infile 'typecolor';
input type$ 1-5+1 color$; 

run;


What are the values of the variables TYPE and COLOR?

A. type color 

    daisyyellow

B. type color 

    daisy ellow

C. type color 

    daisyyellow" "(missing character value)

D. No values are stored for the TYPE and COLOR variables.


raw data에는 Daisyyellow라는 하나의 observation이 있고요. 얘를 불러와서 flowers라는 데이타를 만들려고 합니다. 이 Daisyyellow는 11개의 문자열이고요. 이 문자변수에서 type과 color를 읽으려고 합니다. 이때 type는 첫번째부터 다섯번째자리까지를 할당해야하고, 거기서 +1은 color변수에 할당하는데요. 즉 앞에서는 제외하고 한칸 띄우고 넣어라는 말이예요. ellow를 넣겠죠. 


Answer: B 


반응형

+ Recent posts