الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

استفسار في Binary File

بدأه السهم الثاقب في 1 مايو 2009 · 1 رد · 450 مشاهدة · في الأسئلة المجابة
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

كيف يمكن اني ارتب اسماء في binary file حسب الابجدية

#2

Write a program to create a binary file of employees where each employee has name, ID and salary. The program should keep on reading employees’ information from the keyboard until the user enters <Ctrl>+Z.

After creating the file as explained above, the program should sort the employees according to the descending order of their salaries. The program should display a list of three options to sort the file, and then user chooses one of the ways (1, 2, or 3) to sort the file as follows:

1. Sort the file on hard disk (without using arrays).

2. Sort the file in main memory (use an array), without modifying the file. (i.e. do not copy the array back to the file).

3. Sort the file in main memory (same as #2), and copy the array back to the file.

Whichever way the user chooses, the sorted employees’ information should be displayed on screen.

مواضيع مشابهة