3) -diff_ files /* DoDiff() Your task: 1. Do argument validation

Выполнен
Заказ
4869815
Раздел
Работа с текстом
Предмет
Другое
Тип работы
Антиплагиат
70% eTXT
Срок сдачи
11 Июн 2022 в 21:00
Цена
0 ₽
Блокировка
10 дней
Размещен
7 Июн 2022 в 02:40
Просмотров
41
Описание работы
3) -diff_files /* DoDiff()
Your task:
1. Do argument validation
- file name length is no more than 1023
- If a command-line argument is too long,
print out "Error: arugment is too long" to stderr
2. Open the two files
- The name of files are given by two parameters
- If you fail to open either file, print out error messsage
- Error message: "Error: failed to open file [filename]\n"
- Error message should be printed out to stderr
3. Read the each line from each file
- If you encounter a line larger than 1023 bytes,
print out "Error: input line [filename] is too long"
- Error message should be printed out to stderr
4. Compare the two files (file1, file2) line by line
5. Print out any different line with the following format
file1@linenumber:file1's line
file2@linenumber:file2's line
6. If one of the files ends earlier than the other, print out an
error message "Error: [filename] ends early at line XX", where
XX is the final line number of [filename].
NOTE: If there is any problem, return FALSE; if not, return TRUE */
4. Compare the two files (file1, file2) line by line
5. Print out any different line with the following format
file1@linenumber:file1's line
file2@linenumber:file2's line
6. If one of the files ends earlier than the other, print out an
error message "Error: [filename] ends early at line XX", where
XX is the final line number of [filename].
NOTE: If there is any problem, return FALSE; if not, return TRUE */
Нужна такая же работа?
  • Разместите заказ
  • Выберите исполнителя
  • Получите результат
Гарантия на работу1 год
Средний балл4.52
СтоимостьНазначаете сами
ЭкспертВыбираете сами
Уникальность работыот 70%
Время выполнения заказа:
2 дня 21 час 20 минут
Выполнен в срок
Отзыв о выполненном заказе
Нужна аналогичная работа?
Оформи быстрый заказ и узнай стоимость
Гарантированные бесплатные доработки в течение 1 года
Быстрое выполнение от 2 часов
Проверка работы на плагиат
Прямой эфир