CORRECT TEXT
Which of the following pieces of code will result in a compiler error message?
A. ON ENDFILE (SYSIN)
BEGIN;
PUT LIST('End of file reached.');
EOF = '15;
END;
B. IF EOF THEN
BEGIN;
K = 0;
L = 1;
END;
C. IF EOF THEN
DO;
K = 0;
L = 1;
END;
D. ON ENDFILE (SYSIN)
DO;
PUT LIST('End of file reached.');
EOF = '1'B;
END;
正解:D
質問 2:
CORRECT TEXT
Given the following declaration, the compiler will issue a warning message that says "INITIAL list for the array A contains only one item.".
Which INIT statement would correctly eliminate this message? DCL A(10) CHAR(5) INIT( '');
A. INIT( COPY(' '.10))
B. INIT( (10)(' '))
C. INIT((10)' ')
D. INIT(LOW(10))
正解:B
質問 3:
CORRECT TEXT
What will be the output of the following program?
MAIN: PROC OPTIONS(MAIN);
DCL A CONTROLLED FIXED BIN(31);
DCL B CONTROLLED FIXED B IN(31);
DCL JX FIXED BIN(31);
DO JX= 1 TO 4;
ALLOC A;
A = JX;
END;
DO WHILE( ALLOCN(A)> 0);
ALLOC B;
B = A;
FREE A; END;
DO WHILE( ALLOCN(B) > 0);
PUT SKIP LIST( B);
FREE B;
END;
END;
A. 4321
B. 1234
C. 4444
D. 1111
正解:B
質問 4:
CORRECT TEXT
Given the following code, what condition prefixes should be placed before the statement to ensure that the reference is valid?
PUT SKIP LIST( '< !! SUBSTR(X,1 ,N) !!'>');
A. SIZE
B. SUBSCRIPTRANGE
C. STRINGRANGE
D. STRINGSIZE
正解:C
質問 5:
CORRECT TEXT
What is the most appropriate wa y to assign a value to variable A?
DCLA BIN FIXED(15);
A. A ='1729'X;
B. A = 17.29;
C. A = 17;
D. A = '17;
正解:C
質問 6:
CORRECT TEXT
Given the following code, how many elements of A will contain a value of 0 after execution of the
loops?
DOL A DIM (8, 10) FIXED BIN (31);
DCL(I, K) FIXED BIN (31) INIT (0);
A = 0;
DO I = 2 TO 8;
DO K = 1 TO 10;
A(I, K) = l*K;
END;
END;
A. 0
B. 1
C. 10
D. 6
正解:C
質問 7:
Given the following program, what is shown by the dump?
A. F is open and the storage for Y is no longer on the stack
B. F is closed and the storage for Y is still on the stack
C. PROC;
DCLY FIXED BIN(31) INIT(29);
X = Y;
OPEN FILE(F);
SIGNAL ERROR;
END;
END;
D. PROC;
DCL X FIXED BIN(31) INIT(17);
DCL F FILE RECORD OUTPUT;
ON ERROR
BEGIN;
CALL PLIDUMP('TFB');
END;
CALL B;
E. F is closed and the storage for Y is no longer on the stack
F. F is open and the storage for Y is still on the stack
正解:D,F
質問 8:
CORRECT TEXT
What is the result of executing the following code?
DCLA BIN FIXED(31) INIT(10000);
DCL B BIN FIXED(15) INIT(8000);
B = B/A;
A. The value of B is 1.
B. The value of B is 0.
C. CONVERSION would be raised.
D. The value of B is 0.8.
正解:B