Consider the following:

77 A PIC 9(10)
77 B PIC 9(10)
77 C PIC 9(19)

MULTIPLY AB BY B GIVING C

Which of the following is true ?

(a) The execution of the above may result in size error.
(b) The execution of the above will result in size error.
(c) The definition of C is invalid resulting in compilation
error.
(d) No error will be thee and the program would proceed
correctly.

Answers were Sorted based on User's Feedback



Consider the following: 77 A PIC 9(10) 77 B PIC 9(10) 77 C PIC 9(19) MULTIPLY AB BY..

Answer / abinand shetty

re c is the correct one as maximum numerical declaration
can be 9(18) .so above will result in compilation error

Is This Answer Correct ?    13 Yes 0 No

Consider the following: 77 A PIC 9(10) 77 B PIC 9(10) 77 C PIC 9(19) MULTIPLY AB BY..

Answer / anu

c. since maximum digits for numeric data type is 18 only.

Is This Answer Correct ?    10 Yes 0 No

Consider the following: 77 A PIC 9(10) 77 B PIC 9(10) 77 C PIC 9(19) MULTIPLY AB BY..

Answer / prasanna

A and B are two different variables and there is no
variable declared as AB. Do COBOL has enough knowledge to
identify and multiply the vaiable A and the variable B,
then by B giving the result in C. I don't think so.

Kindly correct me if I am wrong..

Is This Answer Correct ?    7 Yes 1 No

Consider the following: 77 A PIC 9(10) 77 B PIC 9(10) 77 C PIC 9(19) MULTIPLY AB BY..

Answer / vel

a

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More COBOL Interview Questions

How to use the same COBOL program in Batch and CICS on lines? explain with an example

0 Answers   IBM,


WHAT IS SOC3?HOW IT CAN BE RESOLVED?

1 Answers  


How to increase the logical record length of existing PS file?

7 Answers  


What is level 66 used for ?

3 Answers   TCS,


We are using the searching a table which is indexed, once the key is found, how can we get the occurance at which the key was found.

1 Answers  






if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.

2 Answers   IBM, Steria,


What type of Call you would use if you don;t want the control back to the calling program?

8 Answers   TCS,


How can you add a particular field/coloumn in copybook?

3 Answers   ADP, DELL, L&T,


how do u link sub pgm to main pgm ?

2 Answers   TCS,


Explain Restart Logic in Cobol?

1 Answers   L&T, Syntel,


how would find total records in files using seqientional

1 Answers   HSBC,


give the examples for strings and unstrings in cobol

2 Answers   IBM,


Categories