305 views
5 votes
Which of the following statements creates a macro variable named rate that has a value of 23?

a. let rate="23";
b. &let rate=23;
c. %let rate=23;
d. %let rate="23";

User Chattsm
by
8.0k points

1 Answer

4 votes

Final answer:

Option c, '%let rate=23;', is the correct syntax for creating a macro variable named 'rate' with a value of 23 in SAS.

Step-by-step explanation:

The statement that creates a macro variable named rate with a value of 23 in SAS is option c: %let rate=23;. This is the correct syntax for defining a macro variable in SAS. The ampersand (&) is not used to define a macro variable but to reference one that has already been defined.

While options a and d use the %let statement, they mistakenly include double quotes around the number, which is not necessary when assigning numerical values to macro variables.

User VasiliyL
by
6.7k points