IBM Programming with IBM Enterprise PL/I - 000-041 FREE EXAM DUMPS QUESTIONS & ANSWERS
CORRECT TEXT
What is the result, if any, of executing the following code?
DCL A CHAR(2) INIT(' ');
DCL B BIT(2) INIT('11'B);
A = ^B;
What is the result, if any, of executing the following code?
DCL A CHAR(2) INIT(' ');
DCL B BIT(2) INIT('11'B);
A = ^B;
Correct Answer: A
Vote an answer
CORRECT TEXT
Given the following piece of code, which loop construct using WHILE or UNTIL will give identical output?
DCLI FIXED BIN (31);
DO I = 10 TO 1 BY - 1;
PUT (I);
END;
Given the following piece of code, which loop construct using WHILE or UNTIL will give identical output?
DCLI FIXED BIN (31);
DO I = 10 TO 1 BY - 1;
PUT (I);
END;
Correct Answer: B
Vote an answer
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;
Correct Answer: C
Vote an answer
CORRECT TEXT
What is the result, if any, of executing the following code?
DCL B DEC FIXED(15,3) INIT(12345.12);
DCL C PlC '9999999999' INIT (0);
C = B;
What is the result, if any, of executing the following code?
DCL B DEC FIXED(15,3) INIT(12345.12);
DCL C PlC '9999999999' INIT (0);
C = B;
Correct Answer: D
Vote an answer
CORRECT TEXT
What code must be added after EOF = '1'B, if any, to print 'EOF REACHED'?
DCL INF FILE RECORD INPUT;
DCL INFIELD CHAR(100) BASED(P);
DCL P PTR;
DCL EOF BIT(l) INIT('0'B);
ON ENDFILE(INF) BEGIN;
EOF = 'l's;
PUT SKIP LIST(INFIELD);
END;
OPEN FILE(INF);
READ FILE(INF) SET(P);
DO WHILE(AEOF);
READ FILE(INF) SET(P);
END;
What code must be added after EOF = '1'B, if any, to print 'EOF REACHED'?
DCL INF FILE RECORD INPUT;
DCL INFIELD CHAR(100) BASED(P);
DCL P PTR;
DCL EOF BIT(l) INIT('0'B);
ON ENDFILE(INF) BEGIN;
EOF = 'l's;
PUT SKIP LIST(INFIELD);
END;
OPEN FILE(INF);
READ FILE(INF) SET(P);
DO WHILE(AEOF);
READ FILE(INF) SET(P);
END;
Correct Answer: C
Vote an answer
CORRECT TEXT
How should the file ACCOUNT be declared if the program first writes records to ACCOUNT and
afterwards reads them back from ACCOUNT?
How should the file ACCOUNT be declared if the program first writes records to ACCOUNT and
afterwards reads them back from ACCOUNT?
Correct Answer: A
Vote an answer
CORRECT TEXT
The following code calls an external function procedure. Which program matches the entry declaration?
DCL F FLOAT;
DCLX CHAR(1);
DCL FUN ENTRY (FIXED BIN (15), FLOAT) RETURNS (CHAR(1));
X=FUN(1, F);
The following code calls an external function procedure. Which program matches the entry declaration?
DCL F FLOAT;
DCLX CHAR(1);
DCL FUN ENTRY (FIXED BIN (15), FLOAT) RETURNS (CHAR(1));
X=FUN(1, F);
Correct Answer: A
Vote an answer