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

which one is the best of com and com-3.using of real time ?

7 Answers   Cap Gemini,


01 x pic s9(8) comp. How will the following value be internally allocated '18787'

4 Answers   Steria,


Can we move SPACES to numeric field and ZEROES to alphabetic field? If yes what are the way doing this?

6 Answers   T systems,


Which of the following paragraphs is compulsory in every COBOL program? (a) SPECIAL-NAMES (b) PROGRAM-ID (c) FILE-CONTROL (d) OBJECT-COMPUTER

4 Answers  


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

0 Answers  






Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?

0 Answers  


i have variable record in the 5th, i want to sort from 5th filed ? how ?

2 Answers   TCS,


where will we code call by content and call by reference dude pls reply soon ?

2 Answers  


COBOL Snippet: Tell where the control will when the below code execute IF (A=B) CONTINUE ELSE NEXT SENTENCE PERFORM <IMP-STMT> END-IF.

7 Answers   HCL,


suppose a cobol programme A calling programme B,C and D. If C undergoes some change what if A,B,C,D need to be recompiled or only C nee to be recompliled.

2 Answers   IBM,


How many maximum number of procedures can we write in one COBOL program?

6 Answers  


What will happen if we generate GDG +2 version instead of +1 version?

2 Answers   T systems,


Categories