Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam A00-212 topic 1 question 17 discussion

Actual exam question from SAS Institute's A00-212
Question #: 17
Topic #: 1
[All A00-212 Questions]

The following SAS program is submitted:
%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 set cat
  • C. a is frog
  • D. a is bird
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Mangosteen_VV
9 months ago
a is pig %let a=cat creates variable a in global symbol table; %macro animal (a=frog): as this is parameter, variable a with value of frog is created in local symbol table %put a is &a is to print variable a. As this is inside a macro, this will look at local symbol table first and take value of frog. %let a=bird looks at the local symbol table first and will find and overwrite variable a =frog with a=bird. When the macro is called with parameter, SAS will look at local symbol table and find and overwrite variable a with a =pig
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...