Multiple choice technology programming languages

%let x=5; %let y=10; %let a=%nrstr(%eval(&x + &y)); What is the output of the two put statement %put QCMPRES: %qcmpres(&a); %put CMPRES: %cmpres(&a);

  1. QCMPRES: %eval(&x + &y) CMPRES: 15

  2. CMPRES: 15 QCMPRES: %eval(&x + &y)

  3. QCMPRES: 15 CMPRES: 15

  4. QCMPRES:%eval(&x+&y) CMPRES: 15

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The %NRSTR function masks its argument at compilation, so &a is assigned the literal text '%eval(&x + &y)' without resolution. %QCMPRES quotes the masked text and removes extra blanks, returning the masked form as-is. %CMPRES attempts to resolve the reference; since &a contains masked text, it resolves to '%eval(&x + &y)' and evaluates to 15. Therefore QCMPRES shows the masked literal, while CMPRES shows the computed value.