[Free] 2018(Jan) EnsurePass Examcollection IBM C9050-041 Dumps with VCE and PDF 51-60

Ensurepass.com : Ensure you pass the IT Exams
2018 Jan IBM Official New Released C9050-041
100% Free Download! 100% Pass Guaranteed!
http://www.EnsurePass.com/C9050-041.html

Programming with IBM Enterprise PL/I

Question No: 51 – (Topic 1)

Given the following piece of code, what will happen when the code is executed if STRINGSIZE is not enabled?

DCL X CHAR (5) INIT (#39;ABCDE#39;); DCL Y CHAR (3) INIT (#39;#39;);

Y = X;

  1. Y receives the value #39;ABC#39; and the next two bytes following Y#39;s storage are overridden by #39;DE#39;.

  2. Y receives the value #39;ABC#39; and #39;DE#39; is not assigned to any storage area.

  3. The assignment is not executed and program execution continues after the assignment.

  4. The assignment is not executed and program execution abends.

Answer: B

Question No: 52 – (Topic 1)

Given the following code, the compiler will issue the message quot;RULES(NOLAXIF) requires BIT(1) expressions in IF, WHILE, etc.quot; under the option RULES(NOLAXIF).

In order to fix this problem, the IF statement should be changed to:

  1. PROC( RC );

    DCL RC FIXED BIN(31); IF RC = 0 ! 4 THEN

  2. IF RC = (0 ! 4) THEN

  3. IF RC = 0 ! RC = 4 THEN

  4. IF BIT(RC = 0 ! 4 ) THEN

  5. IF BOOL(RC = 0,4,#39;0111#39;B) THEN

Answer: B

Question No: 53 – (Topic 1)

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(#39;0#39;B);

ON ENDFILE(INF) BEGIN; ALLOC INFIELD;

INFIELD = #39;EOF REACHED#39;; END;

OPEN FILE(INF);

READ FILE(INF) SET(P);

DO WHILE(^EOF); READ FILE(INF) SET(P); EOF = #39;1#39;B;

END;

  1. End of file will never be reached

  2. INFIELD will have a value #39;EOF REACHED#39; and the program ends

  3. Infinite loop

  4. Runtime error because there is no CLOSE statement

Answer: A

Question No: 54 – (Topic 1)

Given the following piece of code, which loop construct using WHILE or UNTIL will give identical output?

DCL I FIXED BIN (31); DO I = 10 TO 1 BY -1; PUT (I);

END;

  1. I = 10;DO WHILE (I gt; 1);PUT (I);I = I – 1;END;

  2. I = 10;DO WHILE (I gt;= 1);I = I – 1;PUT (I);END;

  3. I = 10;DO UNTIL (I lt; 1);PUT (I);I = I – 1;END;

  4. I = 10;DO UNTIL (I gt; 1);PUT (I);I = I – 1;END;

Answer: C

Question No: 55 – (Topic 1)

Which of the following techniques will NOT cause a referenced external subprocedure to be handled as FETCHABLE when the referencing program is compiled?

  1. OPTIONS(FETCHABLE) as an attribute of the ENTRY declare statement in the referencing program

  2. OPTIONS(FETCHABLE) as an option of the PROC statement in the subprocedure

  3. Having a FETCH statement for the subprocedure

  4. Having a RELEASE statement for the subprocedure

Answer: B

Question No: 56 – (Topic 1)

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?

  1. BIN FIXED

  2. DEC FIXED

  3. CHAR

  4. PICTURE

Answer: D

Question No: 57 – (Topic 1)

What will be the values of the variables A, B, C and D after executing the following code?

DCL 1 XYZ,

2 A CHAR(4),

2 B BIN FIXED(31),

2 C DEC FIXED(7),

2 D PIC #39;999#39;;

XYZ = #39;#39;;

  1. A is blank, B is zero, C is zero, D is zero

  2. syntax error in XYZ = #39;#39;;

  3. CONVERSION will be raised in XYZ = #39;#39;;

  4. A,B,C and D are zeros.

Answer: A

Question No: 58 – (Topic 1)

What is the result, if any, of executing the following code?

DCL B DEC FIXED(15,3) INIT(12345.12); DCL C PIC #39;9999999999#39; INIT (0);

C = B;

  1. There is no result, because B contains a decimal point.

  2. There is no result, because DEC FIXED cannot be assigned to PIC.

  3. The result in C is 12345 with 5 leading zeroes.

  4. The result in C is 1234512 with 3 leading zeroes.

Answer: C

Question No: 59 – (Topic 1)

Given the following code, what SELECT code is NOT equivalent?

DCL (C, W, V) CHAR (1);

SELECT (C);

WHEN (#39;A#39;, #39;B#39;) PUT (#39;1#39;);

WHEN (#39;C#39;) PUT (#39;2#39;);

WHEN (W) PUT (#39;3#39;);

WHEN (V) PUT (#39;4#39;); OTHER PUT (#39;0ther#39;); END;

  1. SELECT (C); WHEN (#39;C#39;) PUT (#39;2#39;); WHEN (#39;A#39;, #39;B#39;) PUT (#39;1#39;); WHEN (W) PUT (#39;3#39;); WHEN (V) PUT (#39;4#39;); OTHER PUT (#39;0ther#39;);END;

  2. SELECT (C); WHEN (#39;A#39;, #39;B#39;) PUT (#39;1#39;); WHEN (#39;C#39;) PUT (#39;2#39;); WHEN (V) PUT (#39;4#39;); WHEN (W) PUT (#39;3#39;); OTHER PUT (#39;0ther#39;);END;

  3. SELECT (C); WHEN (#39;B#39;, #39;A#39;) PUT (#39;1#39;); WHEN (#39;C#39;) PUT (#39;2#39;); WHEN (W) PUT (#39;3#39;); WHEN (V) PUT (#39;4#39;); OTHER PUT (#39;0ther#39;);END;

  4. SELECT (C); WHEN (#39;A#39;) PUT (#39;1#39;); WHEN (#39;B#39;) PUT (#39;1#39;); WHEN (#39;C#39;) PUT (#39;2#39;); WHEN

(W) PUT (#39;3#39;); WHEN (V) PUT (#39;4#39;); OTHER PUT (#39;0ther#39;);END;

Answer: B

Question No: 60 – (Topic 1)

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;

  1. Variable S is known in the entire procedure.

  2. Variable K is known in the entire procedure.

  3. Variable S is not known in block B.

  4. Variable K is known in group D.

Answer: A

100% Ensurepass Free Download!
Download Free Demo:C9050-041 Demo PDF
100% Ensurepass Free Guaranteed!
Download 2018 EnsurePass C9050-041 Full Exam PDF and VCE

EnsurePass ExamCollection Testking
Lowest Price Guarantee Yes No No
Up-to-Dated Yes No No
Real Questions Yes No No
Explanation Yes No No
PDF VCE Yes No No
Free VCE Simulator Yes No No
Instant Download Yes No No