nerdexam
SAS_Institute

A00-212 · Question #83

Given the following SAS statement: %let idcode = Prod567; Which one of the following statements stores the value 567 in the macro variable CODENUM?

The correct answer is C. %let codenum = %substr(&idcode,%length(&idcode)-2). See the full explanation below for the reasoning.

Question

Given the following SAS statement:

%let idcode = Prod567; Which one of the following statements stores the value 567 in the macro variable CODENUM?

Options

  • A%let codenum = substr(&idcode,length(&idcode)-2);
  • B%let codenum = substr(&idcode,length(&idcode)-3);
  • C%let codenum = %substr(&idcode,%length(&idcode)-2);
  • D%let codenum = %substr(&idcode,%length(&idcode)-3);

How the community answered

(23 responses)
  • A
    13% (3)
  • B
    9% (2)
  • C
    74% (17)
  • D
    4% (1)

Community Discussion

No community discussion yet for this question.

Full A00-212 Practice