Free C9050-041 Exam Braindumps (page: 4)

Page 3 of 52
What happens to the STATIC variables in the program U, if anything, after executing the
following code?

FETCH U;
CALL U;
RELEASE U;
FETCH U;

A. STATIC variables cannot be used in program U.
B. STATIC variables wil have the values from the last time U was called.
C. STATIC variables wil have their INITIAL values.
D. Nothing because there is a syntax error.

Answer(s): C
QUESTION: 8
What should be done, if anything, when the following compiler message appears? Multiple
closure of blocks, one extra END statement assumed.

A. Take out the extra END statement.
B. Find the missing END statement and add it at the right place.
C. PUT an extra END statement at the end of the program.
D. Nothing needs to be done.

Answer(s): B
QUESTION: 9
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. End of file will never be reached
B. INFIELD wil have a value 'EOF REACHED' and the program ends
C. Infinite loop
D. Runtime error because there is no CLOSE statement



Post your Comments and Discuss IBM C9050-041 exam with other Community members: