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
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
How arrays can be defined in COBOL?
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?
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
In which area will you utilize 88 level items in cobol?
What is the LINKAGE SECTION used in COBOL?
Name the divisions, which are available in a cobol program?
What are the different rules to perform a Search?
What are the rules of the move verb?
What are the cobol coding sheets?
Define static linking and dynamic linking.
What rules are followed by the search verb.
What is a SSRANGE and NOSSRANGE?
Write a program to enter and display the names of students in a class using the occurs clause.
Define cobol?