IBM Programming with IBM Enterprise PL/I - C9050-041 模擬練習
CORRECT TEXT
What is the value of B after executing the following code?
DCLA CHAR(1) INIT(' ');
DCL B BIT(8) BASE D(ADDR(A));
DCL (HIGH, ADDR) BUILTIN;
A = HIGH(1);
What is the value of B after executing the following code?
DCLA CHAR(1) INIT(' ');
DCL B BIT(8) BASE D(ADDR(A));
DCL (HIGH, ADDR) BUILTIN;
A = HIGH(1);
正解: D
CORRECT TEXT
What is the value of A in PROC1 after calling PROC2?
PROC1: PROC;
DCLA BIN FIXED(15) INIT(0);
CALL PROC2(A);
END;
PROC2: PROC(A);
DCL A BIN FIXED(15);
A = A + 1;
END;
What is the value of A in PROC1 after calling PROC2?
PROC1: PROC;
DCLA BIN FIXED(15) INIT(0);
CALL PROC2(A);
END;
PROC2: PROC(A);
DCL A BIN FIXED(15);
A = A + 1;
END;
正解: C
CORRECT TEXT
Given the following piece of code, what will happen when the code is executed if STRINGSIZE is not enabled?
DCL X CHAR (5) INIT ('ABCDE');
DCL Y CHAR (3) INIT (");
Y = X;
Given the following piece of code, what will happen when the code is executed if STRINGSIZE is not enabled?
DCL X CHAR (5) INIT ('ABCDE');
DCL Y CHAR (3) INIT (");
Y = X;
正解: D
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');
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');
正解: C
CORRECT TEXT
A programmer has been asked to write a program that tests a variable, X, and writes out A, B, C or D if X is 0, 1, 2 or 3 respectively and writes out E when X has none of those values. Which of the following programs represents the best practice using IF or SELECT statements?
A programmer has been asked to write a program that tests a variable, X, and writes out A, B, C or D if X is 0, 1, 2 or 3 respectively and writes out E when X has none of those values. Which of the following programs represents the best practice using IF or SELECT statements?
正解: D
CORRECT TEXT
Given the following code:
DCL (K, L) FIXED BIN (31) INIT G(0);Certified @ TEST-KINGS.COM
DCL SUB ENTRY( FIXED BIN(31) BYADDR, FIXED BIN(31)) OPT IONS(BYVALUE);
CALL SUB(K, L);
PUT(K, L);
and the following external procedure:
SUB: PROCEDUPE(K, L) OPTIONS( BYVALUE); DCL (K BYADDR, L) FIXED BIN(31);
K = 10;
L = 10;
END;
Which numbers are output by the PUT statement?
Given the following code:
DCL (K, L) FIXED BIN (31) INIT G(0);Certified @ TEST-KINGS.COM
DCL SUB ENTRY( FIXED BIN(31) BYADDR, FIXED BIN(31)) OPT IONS(BYVALUE);
CALL SUB(K, L);
PUT(K, L);
and the following external procedure:
SUB: PROCEDUPE(K, L) OPTIONS( BYVALUE); DCL (K BYADDR, L) FIXED BIN(31);
K = 10;
L = 10;
END;
Which numbers are output by the PUT statement?
正解: D