Tag: programming languages

Questions Related to programming languages

  1. Referencing a nonexistent macro variable results in a warning message. Referencing an invalid macro variable name results in an error message.

  2. Referencing a nonexistent macro variable results in a error message. Referencing an invalid macro variable name results in an warning message.

  3. Referencing a nonexistent macro variable and invalid macro variable name results in an error message.

  4. Referencing a nonexistent macro variable and invalid macro variable name results in an warning message.


Correct Option: A
  1. FORE, BACK

  2. OpenVMS,WIN, HP 300

  3. Batch,Interactive

  4. All of the above


Correct Option: A
  1. month1 June month2 July period1 June July period2 May June period3 July Aug

  2. month1 June month2 July period1 JuneJuly period2 MayJune period3 July.Aug

  3. month1 June month2 July period1 JuneJuly period2 MayJune period3 JulyAug

  4. month1 June month2 July period1 junejuly period2 Mayjune period3 julyaug


Correct Option: C
Explanation:

To understand the resulting values for the macro variables, we need to know that the ampersand (&) is used to reference the value of a macro variable. The resulting values for the macro variables are:

  • %let month1 = June; (the value of month1 is "June")
  • %let month2 = July; (the value of month2 is "July")
  • %let period1 = &month1&month2; (the value of period1 is "JuneJuly")
  • %let period2 = May&month1; (the value of period2 is "MayJune")
  • %let period3 = &month2.Aug; (the value of period3 is "July.Aug")

Therefore, the answer is:

The Answer is: C

%let lib=sasuser; %let year=02; %let month=jan; libname &lib ’SAS-data-library’; proc print data=&lib.y&year&month; run; The dataset name that proc print gets is "sasusery02jan".Which of the following character you will use in place of to finally have "sasuser.y02jan" dataset. proc print data=&lib.y&year&month; run;

  1. . (period)

  2. &(ampersand)

  3. %(percentage)

  4. Any one of the above character


Correct Option: A
  1. title "Report for %sysfunc(left(%sysfunc(today(),worddate.)))";

  2. title "Report for %sysfunc(left(today(), worddate.))";

  3. title "Report for %sysfunc(left(%qsysfunc(today(), worddate.)))";

  4. title "Report for %left(today(), worddate.))";


Correct Option: C
  1. Enterprise Service Repository

  2. Enterprise Service Registry

  3. Integration Directory

  4. Integration Builder


Correct Option: A,B