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

What are the rules of the move verb?

0 Answers  


1) can we display the index?

3 Answers   ADP, IBM,


At the minimum, which division of COBOL is enough to be coded?

3 Answers   CTS,


Identify the invalid dataname from the following: (A) savings-account (B) annual-allocation-for-overhead (C) samount250 (D) 12demand

4 Answers   TCS,


In a COBOL II PERFORM statement, when is the conditional tested, before or after the perform execution?

3 Answers  






can i use multiple when statements in search & search all ? justify ur answer?

2 Answers  


what are the error codes in cobol, db2, cics, vsam , and jcl

2 Answers   TetraSoft,


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

0 Answers  


A table has two indexes defined. Which one will be used by the SEARCH?

0 Answers  


a pic s9(4) comp b pic s9(4) comp-3 c ???????????????? d ???????????????? move a to c add a+B giving d. what is ur declaration for c,d?

4 Answers  


i have a requrement in A as viswa!@#$%&^**reddy i need to move viswareddy in B without junk values pls say how to do ths reply fast

4 Answers   L&T,


I have dataset DS1 which has records say 1 2 3 4 5 ... ... etc And also I have second dataset DS2 whcih has records 1 3 4 5 6 8 .. ... Both the files are sorted and now I want to compare these files and write it into the third files if the records are matching.

4 Answers   FIS, Wipro,


Categories