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
Topics:
SAS Adv Questions |
4 Comments »
D
D. Macro program animal reset the macro variable a with the value Dog
%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
%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