EZ Study

Actuarial Biology Chemistry Economics Calculators Confucius Engineer
Physics
C.S.

SAS Programing Certification Exam
Practice Questions & Answer set-18

Practice Question 88

When multiple expressions are used within a function, what delimiter should
be used to separate them?
A) Space     B) Semicolon     C) Parentheses     D) Comma

Answer: D Reasoning: Multiple variables, constants, and expressions must be separated by a comma when used in an argument.

Practice Question 89

Which of the following statements are correct when using the RETAIN
statement?

A) Variables read with SET statement will not be affected by RETAIN statement

B) The RETAIN statement is used when a variable needs to be initialized to a value of 0
C) Variables will be initialized to the desired value each time the DATA
step is executed
D) Variables are created during execution

Answer: A Reasoning: The RETAIN statement is used when a variable needs to be initialized to a value other than 0. The statement will prevent variables from being initialized. All of this is done during the compilation stage, not the execution stage. Variables that are read with the SET, MERGE, and UPDATE statements are not affected by the RETAIN statement.

Practice Question 90

Which of the following is true about priorities in relation to calculating
arithmetic expressions?

A) If consecutive operators have the same priority, they are always read from right to left
B) Exponential calculations will always be done before multiplication in any simple expression
C) Multiplication and addition have a higher priority than subtraction
D) Arithmetic operations have to be enclosed by parentheses

Answer: B Reasoning: Exponential expressions have a higher priority than multiplication expressions, unless parentheses exist to control any calculations.

Practice Question 91

Statements are free format expressions that make up the SAS program.

Which of the following are true about statements?

A) Statements must begin at the start of the line
B) Statements are always in lowercase to delineate from keywords
C) Only one statement is allowed any line of programming code
D) Statements always end in a semicolon

Answer: D Reasoning: Statements can start anywhere in a line which also allows for multiple statement to exist on a single line. There are no restrictions to the case required for statements. Statements always begin with keywords and end in a semicolon

Practice Question 92

Which of the following items is not considered a category for SAS functions?
A) Special     B) Descriptive Statistics     C) Arithmetic Operations
D) Variable Control

Answer: C Reasoning: There are many categories for SAS functions, but Arithmetic Operations is not one of them. The category is actually Bitwise Logical Operations.

Practice Question 93

Review the code below
infile cards;

Which option is incompatible with this statement?
Click to Get Those Highly Recommended SAS Programmers' Books
a) eof=gohere     b) firstobs=20     c) end=lastline     d) delimiter='ddd'

The value of the INFILE END= option cannot be set for CARDS or DATALINES input.

Practice Question 94

What happens when the LABEL option is omitted in a PROC PRINT step
What happens when the LABEL option is omitted in a PROC PRINT step?
a) The variable name is used as label even when the label is available
b) LABEL statements are not permitted in the PROC PRINT step as a result
c) SAS uses the variable label as a column heading if it is not available
d) LABEL statements can still be coded legally in the PROC PRINT step but without effect.

When the label option is NOT specified. Label statements can still be coded legally in the PROC PRINT step but will have no effect to the Listing.

Related links:

Continue to SAS Practice Exam Question Answer Set-19   SAS interview Questions Answers
Back to SAS Practice Exam Question Answer Set-17   SAS Tutorial   Statistics Tutorial