What is the difference between SEARCH and SEARCH ALL? What
is more efficient?
Answer Posted / ramana
most of the pionts are covered so far, I would like to add
one more point here,
In search all to get expected results array must be in a
specified order, but search all also works for an unsorted
array but may or may not give the expected results as it
keeps on divide.
Ex1: searching for 10. ** Array is not in order**
40
30
34
70
10
90
Iteration 1: it selects the second half 70,10,90
Iteration 2: It selects 10 n says the value is found.
Ex2: searching for te same 10.
40
10
34
70
30
90
Its follows the same process as in 1st case, but here 10 is
not there in the second iteration so it says value not
found, but it is present in the first half, this happens
because aray is not sorted.
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?
how do you reference the printer file formats from cobol programs
Write some characteristics of cobol as means of business language.
What are the rules of the move verb?
There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.
I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?
What is the problem of ordered sequential files access?
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
what are decleratives in cobol?
What is cobol?
What is Pic 9v99 Indicates in COBOL?
In COBOL programming, what is PERFORM? What is VARYING?
A table has two indexes defined. Which one will be used by the SEARCH?
Define static linking and dynamic linking.
What is the difference between binary search and sequential search?