IBM Programming with IBM Enterprise PL/I - C6030-041무료 덤프문제 풀어보기
CORRECT TEXT
Which of the following is a BIT string constant?
Which of the following is a BIT string constant?
정답: B
CORRECT TEXT
What happens after end of file has been reached in the following code, assuming the input file has
more than 100 records?
DCL INF FILE RECORD INPUT;
DCL INFIELD CHAR(100) BASED(P);
DCL P PTR;
DCL EOF BIT(1) INIT('0'B);
ON ENDFILE(INF) BEGIN;
ALLOC INFIELD;
INFIELD = 'EOF REACHED';
END;
OPEN FILE(INF);
READ FILE(INF) SET(P);
DO WHILE(^EOF);
READ FILE(INF) SET(P);
EOF = '1'B;
END;
What happens after end of file has been reached in the following code, assuming the input file has
more than 100 records?
DCL INF FILE RECORD INPUT;
DCL INFIELD CHAR(100) BASED(P);
DCL P PTR;
DCL EOF BIT(1) INIT('0'B);
ON ENDFILE(INF) BEGIN;
ALLOC INFIELD;
INFIELD = 'EOF REACHED';
END;
OPEN FILE(INF);
READ FILE(INF) SET(P);
DO WHILE(^EOF);
READ FILE(INF) SET(P);
EOF = '1'B;
END;
정답: D
CORRECT TEXT
Given the following code, what construct is equivalent?
SELECT;
WHEN(A< 1) B += 1;
WHEN (A < 2) B += 2;
WHEN (A< 3) B+= 3;
OTHERWISE B = 0;
END;
Given the following code, what construct is equivalent?
SELECT;
WHEN(A< 1) B += 1;
WHEN (A < 2) B += 2;
WHEN (A< 3) B+= 3;
OTHERWISE B = 0;
END;
정답: D
CORRECT TEXT
What would be printed, if anything, to SYSPRINT after executing the following code?
DCLA CHAR(5) INIT('1000');
DCL B PlC 'S99999' INIT(2000);
B = A + B;
PUT SKIP LIST('THE VALUE OF B IS:' !! B);
What would be printed, if anything, to SYSPRINT after executing the following code?
DCLA CHAR(5) INIT('1000');
DCL B PlC 'S99999' INIT(2000);
B = A + B;
PUT SKIP LIST('THE VALUE OF B IS:' !! B);
정답: C
CORRECT TEXT
Given the following piece of code, how many times is the loop executed?
DCLI FIXED BIN (31);
I = 20;
DO UNTIL (I = 0); PUT (I);
I = I - 3;
END;
Given the following piece of code, how many times is the loop executed?
DCLI FIXED BIN (31);
I = 20;
DO UNTIL (I = 0); PUT (I);
I = I - 3;
END;
정답: D
CORRECT TEXT
What is the difference between the following two DECLARE statements, if any?
XX: PROC;
DCLA BIN FIXED(31) STATIC INIT(O);
DCL B SIN FIXED(31) AUTOMATIC INIT(0);
END;
What is the difference between the following two DECLARE statements, if any?
XX: PROC;
DCLA BIN FIXED(31) STATIC INIT(O);
DCL B SIN FIXED(31) AUTOMATIC INIT(0);
END;
정답: D
CORRECT TEXT
In which of the following situations can a subroutine be replaced by a function without any major changes to the code?
In which of the following situations can a subroutine be replaced by a function without any major changes to the code?
정답: C
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);
정답: A
CORRECT TEXT
Given the following code, which value is output on the last line?
DCL N FIXED BIN (31);
DCL X FIXED BIN (31) INIT (0);
DON = 1 TO 7, 11 TO 15 WHILE (X< 20);
X = N*N;
PUT SKIP LIST (X);
END;
Given the following code, which value is output on the last line?
DCL N FIXED BIN (31);
DCL X FIXED BIN (31) INIT (0);
DON = 1 TO 7, 11 TO 15 WHILE (X< 20);
X = N*N;
PUT SKIP LIST (X);
END;
정답: B