A00-211 Crambible Dump

SAS 크램바이블 덤프, SAS 베이스 자격증 문제풀이   


QUESTION NO: 7


The following SAS program is submitted: 


data one;
addressl= '214 London Way';
run;

data one;
set one;
address = tranwrd(address1, 'Way', 'Drive'); 

run;

What are the length and value of the variable ADDRESS?


A. Length is 14; value is '214London Dri'.
B. Length is 14; value is'214 London Way'.

C. Length is 16; value is'214 London Drive'. 

D. Length is 200; value is'214 London Drive'.



데이타 one을 만드는데, address1이 '214 London Way' 가 들어갑니다. 

길이를 따로 설정해주지 않았기때문에 자동으로 '214 London Way' 길이만큼 들어가겠죠.

공백까지 같이 세어보니 길이가 14 입니다. 


또 데이타 one을 만드려고하는데 그 전에 one을 만들었으니 다시 덮어쓰고 있습니다. 

그런데 set one 이 있으니, 그 전에 데이타 one을 불러와서 씁니다. 

이때 address라는 변수를 만드는데, transwrd(address1, 'Way', 'Drive) 라고 되어있네요. 


즉, 변수 = transwrd(변수, 바꾸고싶은 문자, 바꾼 후의 문자); 의 명령어인데요. 

이 transwrd는 Lenght 를 200으로 맞추고요. 문자를 바꾸는 역할을 합니다. 


따라서 214 London Drive (length 200) 으로 바뀌게 되겠죠.


Answer: D


반응형

+ Recent posts