Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Go through this

Former Member
0 Likes
667

data: field1 type I value 10.

End-of-selection.

Subtract 2 from field1.

Write: / 'field1 =', field1.

Start-of-selection.

Add 5 to field1.

Write: / 'field1 =', field1.

Initialization.

Field1 = 5.

Write: / 'field1 =', field1.

What is the result after executing the above code?

a) field1 = 10

field1 = 8

b) field1 = 8

field1 = 14

field1 = 5

c) field1 = 5

field1 = 3

field1 = 8

d) field1 = 5

field1 = 10

field1 = 8

e) field1 = 8

field1 = 14

data: field1 type I value 10.

End-of-selection.

Subtract 2 from field1.

Write: / 'field1 =', field1.

Start-of-selection.

Add 5 to field1.

Write: / 'field1 =', field1.

Initialization.

Field1 = 5.

Write: / 'field1 =', field1.

What is the result after executing the above code?

a) field1 = 10

field1 = 8

b) field1 = 8

field1 = 14

field1 = 5

c) field1 = 5

field1 = 3

field1 = 8

d) field1 = 5

field1 = 10

field1 = 8

e) field1 = 8

field1 = 14

5 REPLIES 5
Read only

Former Member
0 Likes
647

d is correct

Read only

Former Member
0 Likes
647

Hi,

D

Regards

Read only

Former Member
0 Likes
647

Hi,

The result is

d) field1 = 5

field1 = 10

field1 = 8

First initialization will trigger, then start of selection and then the end of selection.

Regards,

Vani

Read only

Former Member
0 Likes
647

ans is d as said earlier

reward points if found useful

Read only

Former Member
0 Likes
647

sorry A is correct. D is not correct because we do not write 'WRITE' statment in initialization