IBM Programming with IBM Enterprise PL/I - 000-041 Exam Practice Test
CORRECT TEXT
What is the most appropriate declaration for the variable A?
A = '10010001'B;
What is the most appropriate declaration for the variable A?
A = '10010001'B;
Correct Answer: B
CORRECT TEXT
Which of the following is NOT a valid way to set a pointer P to zero?
Which of the following is NOT a valid way to set a pointer P to zero?
Correct Answer: D
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);
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);
Correct Answer: A
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;
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;
Correct Answer: B
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);
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);
Correct Answer: D
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: A
In order to use a pointer to access the variable in the following program, with what storage class should Y be declared?
Correct Answer: B
CORRECT TEXT
Given the following code, with what attribute should the variable EOF be declared?
DO WHILE(^EOF);
Given the following code, with what attribute should the variable EOF be declared?
DO WHILE(^EOF);
Correct Answer: D
CORRECT TEXT
Which of the following is NOT mandatory for an external function procedure and its usage?
Which of the following is NOT mandatory for an external function procedure and its usage?
Correct Answer: D