Consider the following COBOL entries:
05 X PIC 99 VALUE 10.
SUBTRACT 20 FROM X.
The resultant value of X wil be

Answers were Sorted based on User's Feedback



Consider the following COBOL entries: 05 X PIC 99 VALUE 10. SUBTRACT 20 FROM X. The resulta..

Answer / sayan

since no sign clause is mentioned, the minus sign is
ignored and the resultant value of X will be 10.

Is This Answer Correct ?    16 Yes 1 No

Consider the following COBOL entries: 05 X PIC 99 VALUE 10. SUBTRACT 20 FROM X. The resulta..

Answer / sweta

Answer will be 10.

Is This Answer Correct ?    12 Yes 0 No

Consider the following COBOL entries: 05 X PIC 99 VALUE 10. SUBTRACT 20 FROM X. The resulta..

Answer / rajiv gupta

Answeer would be 10. as 20 -10 should be -10 but X is not
declared as signed variable as S9(2)so answer is 10.

Is This Answer Correct ?    5 Yes 1 No

Consider the following COBOL entries: 05 X PIC 99 VALUE 10. SUBTRACT 20 FROM X. The resulta..

Answer / swappy

Answer #3 is correct. Since there is no sign clause it will
just ignore the -ve sign and resultant will be 10.
Also Prabhu, there is no problem with the level no. There
will not be any error due to the level no.

Is This Answer Correct ?    4 Yes 1 No

Consider the following COBOL entries: 05 X PIC 99 VALUE 10. SUBTRACT 20 FROM X. The resulta..

Answer / madhu

x=x-20 will be -10

Since there is a -ve sign in the beginning it'll be stored
on top of the last digit. So -0 = }.

Then ans will be 1}

Is This Answer Correct ?    4 Yes 4 No

Consider the following COBOL entries: 05 X PIC 99 VALUE 10. SUBTRACT 20 FROM X. The resulta..

Answer / guest

x= x -20 it will give error

Is This Answer Correct ?    2 Yes 4 No

Consider the following COBOL entries: 05 X PIC 99 VALUE 10. SUBTRACT 20 FROM X. The resulta..

Answer / prabhu shankar

If u see the level number itself u can able to say that it
will show error. Because PIC will have the level number 77
and not like 01,02,03.


So it show the error only.Wll not exucute.

I think so. If any wrong plz apologise me.

Is This Answer Correct ?    1 Yes 7 No

Post New Answer

More COBOL Interview Questions

i have the following varibles in the working storage 05 ws-A PIC X(30) VALUE 'ABCDEFGHIJKLMNOPQRESTUVWXYZ ' 05 WS-B REDEFINES WS-A 10 WS-B1 PIC X(10). 10 WS-B2 PIC 9(10). 10 WS-B3 PIC X(10). If I Display B1, B2 and B3 respectively, what is the value displayed in B2

9 Answers  


what is the minimum number of lines a Cobol program should have to successfully compile and run

11 Answers   ABC, Societe Generale,


How include time & date in the report generation in cobol programing?

2 Answers  


Describe the cobol database components?

0 Answers  


Explain call by context by comparing it to other calls.

1 Answers  






input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.

0 Answers  


what is mainframe? what is the mainframe software ? what is use in s/w field?

7 Answers   CSE,


where did you see the information regarding abend codes in jcl?

1 Answers   Hewitt,


What is the difference between Global and External Variables?

0 Answers  


What will happen if we try to create GDG (+2) generaton instead of (+1) generation?

1 Answers  


How to print 10 to 1 if the input have only 10 digit number?

0 Answers  


whn do i get soc7 abend while moving alphanumeric to numeric or while moving numeric to aplhanumeric please reply ASAP?

9 Answers  


Categories