IBM Programming with IBM Enterprise PL/I - C9050-041 Exam Practice Test
CORRECT TEXT
Which is the impact, if any, of LIKE in the following code?
DCL
1 XY
2 A CHAR(4),
2 B BIN FIXED(31);
DCL 1 YZ LIKE XY;
Which is the impact, if any, of LIKE in the following code?
DCL
1 XY
2 A CHAR(4),
2 B BIN FIXED(31);
DCL 1 YZ LIKE XY;
Correct Answer: A
Vote an answer
CORRECT TEXT
Given the following code, what can be said about the scope of the variables in procedure P?
P: PROCEDURE;
B: BEGIN;
DCL K FIXED BIN (15);
END B;
D: DO;
DCL S CHAR (10);
END D;
END P;
Given the following code, what can be said about the scope of the variables in procedure P?
P: PROCEDURE;
B: BEGIN;
DCL K FIXED BIN (15);
END B;
D: DO;
DCL S CHAR (10);
END D;
END P;
Correct Answer: B
Vote an answer
CORRECT TEXT
What value is output by the following program?
TEST: PACKAGE;
D
CL N EXT FIXED BIN(31) INIT(10);
DCLC(N) EXT CONTROLLED FIXED BIN(31);
MAIN: PROC OPTIONS(MAIN);
ALLOC C;
ALLOC C(20);
N = 30;
CALL UPGM;
END;
UPGM: PROC;
ALLOC C;
N = 40;
PUT SKIP LIST( DIM(C));
END;
END;
What value is output by the following program?
TEST: PACKAGE;
D
CL N EXT FIXED BIN(31) INIT(10);
DCLC(N) EXT CONTROLLED FIXED BIN(31);
MAIN: PROC OPTIONS(MAIN);
ALLOC C;
ALLOC C(20);
N = 30;
CALL UPGM;
END;
UPGM: PROC;
ALLOC C;
N = 40;
PUT SKIP LIST( DIM(C));
END;
END;
Correct Answer: C
Vote an answer
CORRECT TEXT
Given the following DECLARE statement, how many bytes will be allocated to A?
DCL
1 A UNION,
2 C8 CHAR(8),
2 XB FIXED BIN(31),
2 BX BIT(16);
Given the following DECLARE statement, how many bytes will be allocated to A?
DCL
1 A UNION,
2 C8 CHAR(8),
2 XB FIXED BIN(31),
2 BX BIT(16);
Correct Answer: B
Vote an answer
CORRECT TEXT
Which of the following is a BIN FIXED constant?
Which of the following is a BIN FIXED constant?
Correct Answer: A
Vote an answer
CORRECT TEXT
Which of the following options is proper for the PROC statement, but invalid for the ENTRY statement?
Which of the following options is proper for the PROC statement, but invalid for the ENTRY statement?
Correct Answer: A
Vote an answer
CORRECT TEXT
For which of the following data representations is a variable declared with the attribute WIDECHAR meant to be used?
For which of the following data representations is a variable declared with the attribute WIDECHAR meant to be used?
Correct Answer: D
Vote an answer
CORRECT TEXT
What is the result, if any, of executing the following code?
DCL A BIT(1) INIT('0'B);
DCL B BIT(1) INIT('0'B);
DCL C BIT(1) lNlT('1'B);
A = B ! C;
What is the result, if any, of executing the following code?
DCL A BIT(1) INIT('0'B);
DCL B BIT(1) INIT('0'B);
DCL C BIT(1) lNlT('1'B);
A = B ! C;
Correct Answer: B
Vote an answer
CORRECT TEXT
What will be printed to SYSPRINT, if anything, after executing the following code?
DCL A PlC '9999'.
A =' 123';
PUT SKIP LIST('VALUE OF A lS:' !! A);
What will be printed to SYSPRINT, if anything, after executing the following code?
DCL A PlC '9999'.
A =' 123';
PUT SKIP LIST('VALUE OF A lS:' !! A);
Correct Answer: D
Vote an answer
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;
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;
Correct Answer: C
Vote an answer