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

level number 77 is used to define a)group data b)elementary data c)redefine d)none

8 Answers   TCS,


how will you define vsam file in select clause?

3 Answers   Patni,


I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue

0 Answers   IBM,


BY seeing a program how can we say that it is static call or dynamic call

5 Answers   CGI,


Write a program to explain size error.

0 Answers  






We know that size of redefine and redefining need not to be same..Then does the below case true 01 ws-date pic 9(6). 01 ws-redf-date REDEFINES ws-date 05 ws-year pic 9(4) 05 ws-mon pic 9(2) 05 ws-day pic 9(2)

1 Answers   Cap Gemini,


Read a flat file and write last but one (I have n records in a file I have to write n-1th) record in another flat file. Could you please provide me the code in COBOL?

1 Answers  


what is difference between the sysabend and userabend?

2 Answers  


)what is retrieve?

1 Answers   IBM,


is it possible to pass an SQL query inside a jcl which is inside a cobol program?

5 Answers   CTS,


how the control comes back from subprogram to mainprogram

3 Answers   IBM,


Explain Restart Logic in Cobol?

1 Answers   L&T, Syntel,


Categories