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


Please Help Members By Posting Answers For Below Questions

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 arrays can be defined in COBOL?

661


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?

5372


please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?

1951


In which area will you utilize 88 level items in cobol?

716






What is the LINKAGE SECTION used in COBOL?

885


Name the divisions, which are available in a cobol program?

683


What are the different rules to perform a Search?

613


What are the rules of the move verb?

704


What are the cobol coding sheets?

660


Define static linking and dynamic linking.

660


What rules are followed by the search verb.

631


What is a SSRANGE and NOSSRANGE?

818


Write a program to enter and display the names of students in a class using the occurs clause.

647


Define cobol?

856