Consider the following COBOL entries
05 X PIC 99 VALUE 10.
ADD 40 X TO X.
COMPUTE X = 3 * X - 40.
The result in X is

Answer Posted / neelam

I agree with all of them who have answered 40.
It is a simple statement in cobol that

ADD A B TO C. (Means (A+B)+C moved in C)

Here,
ADD 40 X TO X ()

Value of X is 10
So, ADD 40 10 TO 10 (Gives 40+10+10 = 60)


Now, COMPUTE X = 3 * X - 40
Means X = 3 * 60 - 40 (Gives 180 - 40 = 140 )

Since PIC clause for X is 99, hence 140 can't be store in
variable X.

So answer is : 40

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is difference between cobol and cobol/400

21556


What happens when we move a comp-3 field to an edited (say z (9). Zz-)?

770


What is the utilization of copybook in cobol?

651


Name the sections present in data division.

698


What is the difference between PIC 9.99 and 9v99 in COBOL?

729






What is the difference between next sentence and continue in cobol programing language?

708


What guidelines should be followed to write a structured cobol prgm?

668


i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this

992


) How do u handle errors in BMS macro?

1427


example for sub strings ? and refernce modifications whit output pls

1843


Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning

678


Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.

2052


how do you define single dimensional array and multidimensional array in your cobol?

668


What is the difference between structured cobol programming and object alternativelyiented cobol programming?

704


how can i see junk values in dclgen or in hostvariable of comp ?

2541