1.
Which of the following describes when a program is NOT FETCHABLE?
2.
What is the most appropriate declaration for the variable A? A = 'ABCDEF';
3.
What is the value of A after executing the following code? DCL A CHAR(6) INIT ('ABCDEF'); DCL B CHAR(10) INIT ('0123456789'); A = SUBSTR(B,5,3);
4.
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);
5.
Which of the following would NOT access the third element of A? DCL 1 XY(5), 2 A(4) CHAR(4);
6.
Which is the most appropriate data type declaration for the variable A in the following expression, if A is used as a counter? A = A + 1;
7.
What is the most appropriate data type for a variable that is being used to represent numeric data in a printable form and at the same time can be used to perform arithmetic?
8.
Given the following code, with what attribute should the variable EOF be declared? DO WHILE(^EOF);
9.
Which is the most appropriate code to turn all of the bits in A ON? DCL A BIT(8);
10.
Given the following code, what can be said about the scope of the variables in procedure P? P: PROCEDURE; B: BEGIN; DCL K FIXED BIN (15); END B; D: DO; DCL S CHAR (10); END D; END P;