Can we access the a[0] in the array ?

Answers were Sorted based on User's Feedback



Can we access the a[0] in the array ?..

Answer / mandozai

In cobol array starts with 1 not with 0

Is This Answer Correct ?    20 Yes 0 No

Can we access the a[0] in the array ?..

Answer / sandy

Not possible. It will throw compilation error.

Is This Answer Correct ?    8 Yes 2 No

Can we access the a[0] in the array ?..

Answer / jai ho

i think it will send soc4 abend bcoz a[0]
is out of bound.

Correct me

Is This Answer Correct ?    4 Yes 0 No

Can we access the a[0] in the array ?..

Answer / suresh ramaiyan

It will give compilation time error, as the compiler knows
the value of subscript when compile the program.
ex: A[0]

if you are accessing the same by subscript variable, then
it will give run time error.
ex: A[ws-cnt]

Is This Answer Correct ?    3 Yes 0 No

Can we access the a[0] in the array ?..

Answer / i go crazy

The compilation should be done with the compiler option SSRANGE. If NOSSRANGE is used, then we can use A(0) without any issue.

Is This Answer Correct ?    3 Yes 0 No

Can we access the a[0] in the array ?..

Answer / dev

Can u explain why it throws compilation error?

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More COBOL Interview Questions

what is the result of the following? DIVIDE A INTO B GIVING C. a.C=A/B b.the reminder of B/A is stored in C c.C=B/A d.the reminder of A/B is stored in C

3 Answers   TCS,


write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc

0 Answers  


What is SDSF?

13 Answers   IBM,


how do you define single dimensional array and multidimensional array in your cobol?

0 Answers  


Why there is no questions in this column?

6 Answers  


What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?

0 Answers   TryTechnicals Pvt Ltd,


How much salary you are expecting? If they ask in an interview, what we have to tell?

6 Answers   Tech Mahindra, Wipro,


Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning

0 Answers  


I have a Flat file in which certain records are present in a tabular format. I need to extract some of the records on some basis from it and copy them into a flat file...how it can be done ??

2 Answers   HCL,


hi dudes.....can any one help me..... what is SET TO TRUE all about,anyway?

1 Answers  


How to retain the Duplicates in the one records?

3 Answers   CS,


I have a seq file with different fields one field is address with pic x(50) as input in a cobol program. In address there is 'PUNE' at any different positions in the address field ( form 1 t0 50) . My requirement is select the fields with address 'PUNE' by using cobol. Please suggest

2 Answers   IBM,


Categories