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
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 |
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 |
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 |
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 |
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 |
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
what is lrec=f,what is difference between f,fb,v,vb?what is default value?how do we came to know that records are in f,fb,v,vb?
what is difference between cobol and cobol/400
Discuss about changing dataset name in proc.
hi, can you ppl tell me, how to check whether the rewrite we gave for the ksds file is successful or not in the program.? i gave rewrite, the rewrite code is executing and maxcc=0 but updation doenot happen in the file?
give the examples of strings in cobol
What is redefines clause in COBOL?
What are the access modes of START statement?
01 a pic s9(5) value -12345, if we disply a , the sign will overpunched with last digit but i need to get the miuns sign in the result?
Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?
how can i see junk values in dclgen or in hostvariable of comp ?
What is link edit in cobol?