Tag: programming languages

Questions Related to programming languages

Which keyword, when added to the PROC FORMAT statement, will display all the formats in your catalog?

  1. FMTCAT

  2. CATALOG

  3. FMTLIB

  4. LISTFMT


Correct Option: C

AI Explanation

To display all the formats in your catalog, you need to add the keyword "FMTLIB" to the PROC FORMAT statement.

Let's go through each option to understand why it is correct or incorrect:

Option A) FMTCAT - This option is incorrect because the "FMTCAT" keyword is not used to display all the formats in your catalog.

Option B) CATALOG - This option is incorrect because the "CATALOG" keyword is not used to display all the formats in your catalog.

Option C) FMTLIB - This option is correct because the "FMTLIB" keyword is used to display all the formats in your catalog.

Option D) LISTFMT - This option is incorrect because the "LISTFMT" keyword is not used to display all the formats in your catalog.

The correct answer is C) FMTLIB. This option is correct because adding the "FMTLIB" keyword to the PROC FORMAT statement will display all the formats in your catalog.

Which of the following would you use to compare the result of investing $X a year for 6 years in three different banks that compound interest monthly? Assume a fixed rate for the 6-year period.

  1. DO WHILE statement

  2. nested DO loops

  3. a DO group

  4. DO UNTIL statement


Correct Option: B

Macro character functions

  1. can be used to manipulate character strings in macro variable values.

  2. have the same basic syntax as the corresponding DATA step functions and yield similar results.

  3. all of the above

  4. none of the above


Correct Option: C
  1. %let currdate = %sysfunc(today(), worddate.);

  2. %let currdate = &sysdate9;

  3. %let currdate = %sysfunc(date());

  4. all of the above


Correct Option: D
  1. The step does not execute.

  2. The first numeric column is summed by default.

  3. The GROUP BY clause is changed to an ORDER BY clause.

  4. The step executes but does not group or sort data.


Correct Option: C

SAS is not portable ...

  1. True

  2. False


Correct Option: B

SAS Key words can't be used as variable names

  1. True

  2. False


Correct Option: B