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 / rama krishna
Answer is again 10.
Add 40 to x :
x + 40 : 10 + 40 = 50
X = 3*X - 40
3 * x = 50 * 3 = 150, but since x declared as PIC 99, 1
will be truncated from 150. so now the value of x would be
50. so 50 - 40 is again 10.
| Is This Answer Correct ? | 22 Yes | 6 No |
Post New Answer View All Answers
What is the Purpose of Pointer in the string?
What is the use of intialize verb?
What are the different rules to perform a Search?
how to convert the recors form vsam file to db2 table tru file aid
What is the difference between a binary search and a sequential search what are the pertinent cobol?
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
What rules are followed by the search verb.
What is the local-storage section?
can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech
What is a scope terminator give example?
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
1.Is it possible to move the data from 99.99 to 99v99? 2.What is the CICS-vsam Compilation process? 3.In My GDG 5 generation will be there GDG3 got an abend what will happen? 4.In my GDG first generation is +1 And I want to add the new generation what will happen previous generation? 5.How can you give the PIC clause below conditions A). s9 (reddy), B). s9 (5) occurs 5 times? 6.How override the proc from a particular step? and what is symbolic and override Procs?
In which area will you utilize 88 level items in cobol?
how can i see junk values in dclgen or in hostvariable of comp ?