IBM 000-041 Actual Free Exam Questions & Community Discussion
CORRECT TEXT
What code would result in the BIT string B having all ones?
DCL A CHAR(8) INIT(HIGH(8));
DCL (HIGH ,ADDR) BUILTIN;
What code would result in the BIT string B having all ones?
DCL A CHAR(8) INIT(HIGH(8));
DCL (HIGH ,ADDR) BUILTIN;
Correct Answer: C
Vote an answer
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: B
Vote an answer
CORRECT TEXT
Which of the following will be achieved when making a program FETCHABLE?
Which of the following will be achieved when making a program FETCHABLE?
Correct Answer: B
Vote an answer
CORRECT TEXT
Given the following code, which SIGNAL statement would cause a new page starting with the line 'header text' to be written to file X?
DCLX FILL STREAM PRINT OUTPUT;
ON ENDPAGE(X) PUT SKIP FILE(X) LIST('header text');
Given the following code, which SIGNAL statement would cause a new page starting with the line 'header text' to be written to file X?
DCLX FILL STREAM PRINT OUTPUT;
ON ENDPAGE(X) PUT SKIP FILE(X) LIST('header text');
Correct Answer: D
Vote an answer
CORRECT TEXT
Given the following code, what will be the output of the preprocessor?
%DCL FLAG CHAR;
%FIag = 'TEST ,OPT';
%DCL FUN ENTRY; FUN(FIag)
%FUN: PROC (S);
DCL S CHAR;
IF INDEX(S, 'TEST') > 0 THEN
ANSWER ('put ("Test modus entered");') SKIP;
IF INDEX(S, 'OPT') > 0 THEN ANSWER ('put ("Optimize modus entered");') SKIP;
%END FUN;
Given the following code, what will be the output of the preprocessor?
%DCL FLAG CHAR;
%FIag = 'TEST ,OPT';
%DCL FUN ENTRY; FUN(FIag)
%FUN: PROC (S);
DCL S CHAR;
IF INDEX(S, 'TEST') > 0 THEN
ANSWER ('put ("Test modus entered");') SKIP;
IF INDEX(S, 'OPT') > 0 THEN ANSWER ('put ("Optimize modus entered");') SKIP;
%END FUN;
Correct Answer: A
Vote an answer
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: B
Vote an answer
CORRECT TEXT
What is the result of executing the following code?
DCL A CHARACTER (4) INIT('10.5');
DCL B DEC FIXED(71) INIT(10.5);
B = A + B;
What is the result of executing the following code?
DCL A CHARACTER (4) INIT('10.5');
DCL B DEC FIXED(71) INIT(10.5);
B = A + B;
Correct Answer: B
Vote an answer
CORRECT TEXT
What happens to the STATIC variables in the program U, if anything, alter executing the following code?
FETCH U; CALL U; RELEASE U; FETCH U;
What happens to the STATIC variables in the program U, if anything, alter executing the following code?
FETCH U; CALL U; RELEASE U; FETCH U;
Correct Answer: B
Vote an answer
CORRECT TEXT
What happens, if anything, after end of rile has been reached in the following code?
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;
EOF = '16;
ALLOC INFIELD;
INFIELD = 'EOF REACHED';
END;
OPEN FILE(INF);
READ FILE(INF) SET(P);
DO WHILE(^EOF);
READ FILE(INF) SET(P);
END;
What happens, if anything, after end of rile has been reached in the following code?
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;
EOF = '16;
ALLOC INFIELD;
INFIELD = 'EOF REACHED';
END;
OPEN FILE(INF);
READ FILE(INF) SET(P);
DO WHILE(^EOF);
READ FILE(INF) SET(P);
END;
Correct Answer: B
Vote an answer
CORRECT TEXT
If the following syntax is incorrect, how should the syntax be changed?
DCL A CHAR(100) BASED(P);
DCL P PTR;
ALLOCATE A;
READ FILE(DDIN) INTO(A);
If the following syntax is incorrect, how should the syntax be changed?
DCL A CHAR(100) BASED(P);
DCL P PTR;
ALLOCATE A;
READ FILE(DDIN) INTO(A);
Correct Answer: A
Vote an answer
0
0
0
10
