A00-211

A00-211 practice questions, page 10 of 11, with answer review and explanations.

Question 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?

  1. type color daisygreen
  2. type color daisy ellow
  3. type color daisyyellow" "(missing character value)
  4. No values are stored for the TYPE and COLOR variables.

Question 47

A user-defined format has been created using the FORMAT procedure. Where is it stored?

  1. in a SAS catalog
  2. in an external binary file
  3. in a SAS dataset in the WORK library
  4. in a SAS dataset in a permanent SAS data library

Question 48

The following SAS program is submitted: data work.flights; destination = cph; select(destination); when(LHR) city = London; when(CPH) city = Copenhagen; otherwise city = Other; end; run; What is the value of the CITY variable?

  1. Other
  2. Copenh
  3. Copenhagen
  4. ‘‘(missing character value)

Question 49

The following SAS program is submitted: data work.new; length word $7; amount = 4; it amount = 4 then word = FOUR; else if amount = 7 then word = SEVEN; else word = NONE!!!; amount = 7; run; What are the values of the AMOUNT and WORD variables in SAS dataset work.new?

  1. amount word 4 FOUR
  2. amount word 4 NONE!!!
  3. amount word 7 FOUR
  4. amount word

Question 50

The following SAS program is submitted, creating the SAS data set ONE: data one; infile file specification; input num chars$; run; ONE - NUM CHAR - ------- --------- 1 23 3 23 1 77 The following SAS program is submitted: proc print data = one; where char = 23; run; What is output?

  1. NUM CHAR 1 77
  2. NUM CHAR 1 23 3 23
  3. NUM CHAR 1 23 3 23 1 77
  4. No output is generated.