최신 IBM certifications II C6030-041 무료샘플문제:
1. CORRECT TEXT
What value will be displayed by the following program?
TEST: PROC OPTIONS (MAIN);
DCL A FIXED BIN INIT (2);
DCL Z FIXED BIN INIT (1729);
CALL SUB;
SUB: PROC;
DCLA FIXED BIN INIT (10);
DCL
1 X,
2 Y FIXED BIN INIT (17),
2 Z FIXED BIN INIT (29);
PUT SKIP LIST (A*Y);
END;
END;
A) 34
B) 3458
C) 170
D) 17290
2. 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;
A) Infinite loop
B) End of file will never be reached
C) Runtime error because there is no CLOSE statement
D) INFIELD will have a value 'EOF REACHED' and the program ends
3. CORRECT TEXT
In which of the following cases is it possible to change the value of a variable in a routine when it is passed to the routine as an argument?
A) The argument is declared as FIXED DEC(7), and the corresponding parameter is declared as FIXED DEC(7) BYADDR.
B) The argument is declared as FIXED BIN(15), and the corresponding parameter is declared as FIXED DEC(7) BYADDR.
C) The argument is declared as FIXED BIN(15), and the corresponding parameter is declared as FIXED BIN(15) BYVALUE.
D) The argument is declared as CHAP(10) VAR, and the corresponding parameter is declared as CHAR(10).
4. 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;
A) The compiler will generate an error message because A is defined more than once.
B) 1
C) The value of A is undefined.
D) 0
5. CORRECT TEXT
If the physical dataset referred to by DDOUT has a maximum record length of 4096 and a
RECFM=V, what happens after executing the following code?
DCL DDOUT FILE RECORD OUTPUT;
DCL OUT_CHAR CHAR(500) VARYING INIT('This is a varchar test'); OPEN FILE(DDOUT);
WRITE FILE(DDOUT) FROM(OUT_CHAR);
A) One record with a length of 500 will be written to the output file.
B) One record with a length of 4096 will be written to the output file.
C) One record with a length of 22 will be written to the output file.
D) An error will occur because of mismatch of record length.
질문과 대답:
질문 # 1 정답: C | 질문 # 2 정답: B | 질문 # 3 정답: A | 질문 # 4 정답: B | 질문 # 5 정답: C |