IBM C9050-041 - Programming with IBM Enterprise PL/I Exam

Page:    1 / 30   
Total 146 questions

What is the most appropriate declaration for the variable X?
X = 1.123E+4;

  • A. DCL X CHAR(4);
  • B. DCL X PIC '9999';
  • C. DCL X DEC FLOAT(16);
  • D. DCL X DEC FIXED(15,3);


Answer : C

Which of the following describes when a program is NOT FETCHABLE?

  • A. When the main program need not be recompiled to reflect the changes made in the called program
  • B. When the called program will be loaded from the library at execution time
  • C. When the called program is part of the main program in the load module
  • D. When two main programs referring to the called program at the same time cannot have different versions of the called program


Answer : C

What code needs to be executed, if any, before the variable A can be successfully accessed?
DCL X PTR;
DCL B CHAR(100) INIT(' ');
DCL A CHAR(100) BASED(X);

  • A. A can be accessed without any further action.
  • B. X = ADDR(B);
  • C. A = B;
  • D. X = NULL();


Answer : B

What is the value of B after executing the following code?
DCL A CHAR(10) VAR;
DCL B BIN FIXED(31) INIT(0);
DCL C CHAR(5) INIT('ABCD');
A = C;
B = LENGTH(A);

  • A. 10
  • B. 7
  • C. 5
  • D. 4


Answer : C

Given the following code, what will be output?
MP: PROC OPTIONS(MAIN);
DCL A CHAR(1) INIT('A');
DCL B CHAR(1) INIT('B');
DCL C CHAR(1) STATIC INIT('C');
CALL SR1(A);
PUT SKIP LIST(A!!B!!C);
SR1: PROC(A);
DCL A CHAR(1);
DCL B CHAR(1);
DCL C CHAR(1);
A = '1';
B = '2';
C = '3';
END SR1;
END;

  • A. 1B3
  • B. 1BC
  • C. 123
  • D. 12C


Answer : B

Page:    1 / 30   
Total 146 questions