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
Whats the difference between search & search ALL?
Which division and paragraphs are mandatory for a COBOL program?
Explain what you understand by passing by value.
In COBOL programming, what is PERFORM? What is VARYING?
What are the access modes of START statement?
How do get the result of your program directly on your pc?
Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.
How did the release of cobol/370 version 1.3 improve the performance of release 1.1?
What are declaratives and what are their uses in cobol?
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
IF I mention stop run in CICS what happens?