Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


I have 2 dimensional array with having 100 elements. So how
to find the 11th item in an array?

Answers were Sorted based on User's Feedback



I have 2 dimensional array with having 100 elements. So how to find the 11th item in an array?..

Answer / dipali jaju

give subscript as 11 ,like if we have temp as table name,
then
display "temperature : " temp(11)

but if table is two dimentional then
__________________________
| 1 | 2 |
|_________ _|____________|
| | | | |
|0-25 |26-50|51-75|76-100|
|_ele_|_ele |_ele |_ele |

so to fetch 11 the record we have to write temp(1,11)

Is This Answer Correct ?    13 Yes 2 No

I have 2 dimensional array with having 100 elements. So how to find the 11th item in an array?..

Answer / sreejith

index
0 1 2 3 4 5 6 7 8 9
0 |
1-this is 11 th item in array
2
3
4
5
6
7
8
9
that is arrymame(1,0)=11th item

Is This Answer Correct ?    13 Yes 7 No

I have 2 dimensional array with having 100 elements. So how to find the 11th item in an array?..

Answer / dinesh

use INDEX by and serach it for 11th displacement.
would you want to straightly go to 11 position.
MOVE 11 to INDEX-NAME.

Is This Answer Correct ?    1 Yes 0 No

I have 2 dimensional array with having 100 elements. So how to find the 11th item in an array?..

Answer / ajay kumar ande

search for element "ajay" in name column using 2d array.suppose a table of 5*5,

procedure division
MOVE +1 TO I
PERFORM UNTILL I>5

MOVE +1 TO J
PERFORM UNTILL J>5

IF NAME = "AJAY"
DISPLAY "FOUND"
ELSE DISPLAY "NOT FOUND"

ADD +1 TO J
END-PERFORM

ADD +1 TO I
END-PERFORM

Is This Answer Correct ?    0 Yes 2 No

I have 2 dimensional array with having 100 elements. So how to find the 11th item in an array?..

Answer / ramesh

U r 100% correct neelam

Is This Answer Correct ?    1 Yes 4 No

I have 2 dimensional array with having 100 elements. So how to find the 11th item in an array?..

Answer / neelam saini

i think above answers r worng.
working-storage section.
01 WS-ARR.
02 WS-A OCCURS 10 TIMES.
03 WS-D OCCURS 10 TIMES PIC XX.
01 I PIC 9(2).
01 J PIC 9(2).
PROCEDURE DIVISION.
MAIN-SECTION.
MAIN-PARA.
PERFORM PARA1 VARYING I FROM 1 BY 1 UNTIL I > 10
AFTER J FROM 1 BY 1 UNTIL J > 10.

DISPLAY WS-D(1,2).
STOP RUN.
PARA1.
ACCEPT WS-D(I , J).

Is This Answer Correct ?    12 Yes 16 No

Post New Answer

More COBOL Interview Questions

What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?

0 Answers  


what is the difference between external and global variables?

1 Answers  


can I copy book which contain db2 statment in procedure divion?

2 Answers   Bank Of America,


TO abend the data sholud open in which mode? 1.new 2.old 3.mod 4.shr

1 Answers   MNC,


What is the default value(s) for an initialize and what keyword allows for an override of the default?

0 Answers  


How do define Dymanic array in cobol how do u define single demensional arry and multidymensional arry in ur cobol.

4 Answers   Cap Gemini,


Describe the cobol database components?

0 Answers  


ID DIVISION. PROGRAM-ID. PLO. DATA DIVISION. WORKING-STORAGE SECTION. 01 VAR1 PIC 9(2). 01 VAR2 PIC X(2). PROCEDURE DIVISION. ACCEPT VAR2. MOVE VAR2 TO VAR1. STOP RUN. if i give 'PI' in var2 then what will b output of progr. any abend?????

6 Answers   TCS,


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,


what is the difference between occurs and occurs depending on? i dont think so there is the difference in storage..then why we should use occurs depending on?

9 Answers   TCS, Tech Mahindra,


whats the disadvantage of search all over search?

4 Answers   Patni, TCS,


Hi Guys, I have faced one interview question if I have requirement to add 5 new columns to existing table what are prerequisite do i need to take.

1 Answers  


Categories