CORRECT TEXT
Given the following declarations, which code is always a valid way to test if the value of B is 7?
DCL P POINTER NIT (NULL());
DCL B FIXED BIN (31) BASED (P);
A. IF P ^= NULL() ! B = 7
THEN PUT ('OK');
B. IF ^ = NULL() THEN IF B = 7 THEN
PUT ('OK');
C. IF B = 7
THEN PUT ('OK');
D. IF B ^ = 7 THEN; ELSE
PUT ('OK');
正解:B
質問 2:
CORRECT TEXT
What is the result, if any, or executing the following code?
DCL A BIT(1) INIT('0'B);
DCLB BIT(1) INIT('0'B);
DCLC BIT(1) INIT('1'B);
A = ^B & C;
A. There is no result because the syntax is wrong.
B. The value of A is'1'S.
C. The value of A is 'OS.
D. The value of A is unpredictable.
正解:B
質問 3:
CORRECT TEXT
What is the value of B after executing the following code?
DCL A CHAR(10) INIT('123abCDEFG');
DCLB BIN FIXED(31) INIT(5);
B = INDLX(A,'AB');
A. 0
B. 4
C. 1
D. 11
正解:A
質問 4:
CORRECT TEXT
What would be printed, if anything, to SYSPRINT after executing the following code?
DCL A BIN FIXED(15) INIT(1000);
DCL B PlC '99999' INIT(2000);
B = A + B;
PUT SKIP LIST('THE VALUE OF B IS:' !! B);
A. THE VALUE OF B IS :03000
B. THE VALUE OF B IS :3000
C. Nothing will be printed because CONVERSION would be raised.
D. THE VALUE OF B IS:3000
正解:A
質問 5:
CORRECT TEXT
Which is the most appropriate data type declaration for the variable A in the following expression, if A is used as a counter?
A = A + 1;
A. PlC
B. CHAR
C. BIN FIXED
D. FLOAT
正解:C
質問 6:
CORRECT TEXT
If the physical dataset referred to by DDOUT has a record length of 200 and RECFM=F, what happens after executing the following code?
DCL DDOUT FILE RECORD OUTPUT;
DCL OUT_CHAR CHAR(200) INIT('HeIlo World'); WRITE FILE(DDOUT) FROM(OUT_CHAR);
A. Runtime error because there is no OPEN statement.
B. Compiler error because there is no OPEN statement.
C. One record with a length of 11 will be written to the output file.
D. One record with a length of 200 will be written to the output file.
正解:D
質問 7:
CORRECT TEXT
What is the result of executing the following code?
DCLA CHAR(6) INIT('100.50');
DCL B BIN FIXED(15) INIT(50);
B = A + B;
A. The value of B is 150.50.
B. The value of B is 150.
C. CONVERSION would be raised.
D. The value of B is 101.
正解:B
質問 8:
CORRECT TEXT
What code needs to be executed, if any, before the variable A can be successfully accessed?
DCL X PTR;
DCL B CHAR(100) INIT('');
DCL A CHAR(100) BASED(X);
A. X = NULL();
B. X = ADDR(B);
C. A can be accessed without any further action.
D. A = B;
正解:B