It’s time to put what you’ve learned to the test, get 5 questions right to pass this unit.
Q1.
Which of the following data types is complete?
Choose the correct answer.
A
C
B
N
C
STRING
D
P
Q2.
You subtract one field with type D from another field with type D. What is the data type of the result?
Choose the correct answer.
A
D
B
I
C
UTCLONG
Q3.
Which of the following expressions can you use to force a type conversion?
Choose the correct answer.
A
COND #( )
B
CONV #( )
C
EXACT #( )
Q4.
You have a result field resultwith TYPE P LENGTH 3 DECIMALS 2. Which of the following statements leads to an exception?
Choose the correct answer.
A
result = EXACT #( 1 / 2 ).
B
result = 1 / 16.
C
result = EXACT #( 1 / 8 ).
Q5.
Which of the following assignments between variables of different data types is guaranteed to be free of rounding, truncation, field overflow, or type mismatches?
There are 2 correct answers.
A
TYPE P LENGTH 3 DECIMALS 2 to TYPE P LENGTH 6 DECIMALS 3
B
TYPE STRING to TYPE I
C
TYPE C LENGTH 10 to TYPE C LENGTH 3
D
TYPE DECFLOAT16 TO TYPE DECFLOAT34
Q6.
Which of the following data types is not a numeric type?