How do you merge two alphabetically ordered input files into a new output file when you wish the output file to be in alphabetical order?
What will be an ideal response?
Because the two input files contain records stored in alphabetical order, and you want the new file to store records in alphabetical order, you first output the input record that has the lower alphabetical value in the name field.
The merging method then proceeds like this: compare two records, write the record with the lower alphabetical name, and read another record from the same input file.
Computer Science & Information Technology