By admin | August 13, 2009

SAS Certified Adv Programmer 50 Questions (20)

The following SAS program is submitted:

%let a=cat;

%macro animal;
    %let a=dog;
%mend;
%animal
%put a is &a;

Which one of the following is written to the SAS log?

a.

a is

b.

a is &a

c.

a is cat

d.

a is dog

4 comments | Add One

  1. admin - 08/13/2009 at 2:27 pm

    D

  2. Blaiso - 05/31/2013 at 11:12 pm

    D. Macro program animal reset the macro variable a with the value Dog

  3. neurosas - 11/6/2013 at 8:14 pm

    %macro animal(a=frog);
    %let a=bird;
    %mend;
    %animal(a=pig)
    %put a is &a;
    What is written to the SAS log?
    A. a is pig
    B. a is cat CORRECT ANSWER
    C. a is frog
    D. a is bird

    Pay attention and compare the differences

  4. neurosas - 11/6/2013 at 8:16 pm

    %let a=cat;
    %macro animal(a=frog);
    %let a=bird;
    %mend;
    %animal(a=pig)
    %put a is &a;
    What is written to the SAS log?
    A. a is pig
    B. a is cat CORRECT ANSWER
    C. a is frog
    D. a is bird
    Pay attention and compare the differences

Leave a Comment

Leave a Reply

Your email address will not be published.