support@Free-Braindumps.com
Register
Login
Toggle Navigation
Vendors
Exam List
Cisco
CompTIA
ISC
EC-Council
EXIN
Fortinet
ITIL
Juniper
Microsoft
VMware
Avaya
SAP
Google
NVIDIA
Salesforce
Amazon
Palo Alto Networks
ISC2
Splunk
ServiceNow
All Vendors
Home
Exams
IBM
C9050-041
Exam
IBM C9050-041 Exam Prep
Programming with IBM Enterprise PL/I (C6030-041)
(Page 9 )
Updated On: 6-Apr-2026
Viewing
Page
9
of
52
pages.
Download
PDF
version
with
146
Questions
Answer(s):
C
QUESTION:
20
A programmer has been asked to write a program that tests a variable, X, and writes out A, B, C
or D if X is 0, 1, 2 or 3 respectively and writes out E when X has none of those values. Which of
the following programs represents the best practice using IF or SELECT statements?
A. SUB1: PROC( X );DCL X FIXED UNSIGNED;IF X = 0 THENPUT SKIP LIST ( 'A');ELSEIF X
= 1 THENPUT SKIP LIST ( 'B');ELSEIF X = 2 THENPUT SKIP LIST ( 'C');ELSEIF X = 3
THENPUT SKIP LIST ( 'D');ELSEPUT SKIP LIST ( 'E');END;
B. SUB2: PROC ( X );DCL X FIXED UNSIGNED;IF X < 2 THENIF X = 0 THENPUT SKIP LIST (
'A');ELSEPUT SKIP LIST ( 'B');ELSEIF X = 2 THENPUT SKIP LIST ( 'C');ELSEIF X = 3
THENPUT SKIP LIST ( 'D');ELSEPUT SKIP LIST ( 'E');END;
C. SUB3: PROC( X ); DCL X FIXED UNSIGNED;SELECT;WHEN ( X = 0 )PUT SKIP LIST (
'A');WHEN( X = 1 )PUT SKIP LIST ( 'B');WHEN( X = 2 )PUT SKIP LIST ( 'C');WHEN( X = 3
)PUT SKIP LIST ( 'D');OTHERWISEPUT SKIP LIST ( 'E');END;END;
D. SUB4: PROC( X ); DCL X FIXED UNSIGNED;SELECT ( X );WHEN ( 0 )PUT SKIP LIST (
'A');WHEN ( 1 )PUT SKIP LIST ( 'B');WHEN ( 2 )PUT SKIP LIST ( 'C');WHEN ( 3 )PUT SKIP
LIST ( 'D');OTHERWISEPUT SKIP LIST ( 'E');END;END;
Answer(s):
D
QUESTION:
21
Given the following code, the compiler wil issue the message "RULES(NOLAXIF) requires
BIT(1) expressions in IF, WHILE, etc." under the option RULES(NOLAXIF).
In order to fix this problem, the IF statement should be changed to:
A. PROC( RC );
DCL RC FIXED BIN(31);
IF RC = 0 ! 4 THEN
B. IF RC = (0 ! 4) THEN
C. IF RC = 0 ! RC = 4 THEN
D. IF BIT(RC = 0 ! 4 ) THEN
E. IF BOOL(RC = 0, 4, '0111'B) THEN
Answer(s):
B
QUESTION:
22
What happens after executing the following code?
DCL A BIN FIXED(15);
A = 1_000;
A. The value of A is 1000.
B. The value of A is 8.
C. The value of A is 1.
D. There is a syntax error.
Previous
Page
1
…
7
8
9
10
11
…
20
30
Download
PDF
Next
Page
Viewing page
9
of
52
Viewing questions 33 - 36 out of 146 questions
Post your Comments and Discuss IBM C9050-041 exam prep with other Community members:
Comments:
Name:
C9050-041
Exam Discussions &
Posts
C9050-041 AI Verifications
AI Tutor
👋 I’m here to help!
AI Tutor
—
C9050-041
–
×
Hello,
I’m your AI study assistant for the
C9050-041
exam. Ask me anything about the exam or the questions on this page, and I’ll break it down so it actually makes sense.
You want it in a
different language?
Just say it.