Assume you are in an interview for a job. The job interviewer asks you to create a simple storage file using C programming. The following bullet points are the requirements of the program you should write. • The program is able to read the input data from the user or from another file containing the same type of data as it would be entered by the user (using redirection of input). • The program should allow

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter7: File Handling And Applications
Section: Chapter Questions
Problem 15RQ
icon
Related questions
Question

Assume you are in an interview for a job. The job interviewer asks you to create a
simple storage file using C programming. The following bullet points are the
requirements of the program you should write.
• The program is able to read the input data from the user or from another file
containing the same type of data as it would be entered by the user (using
redirection of input).
• The program should allow appending one set of data or several sets of data,
making sure the user indicates when the input data is finished or the input file
reached its end. Before starting the appending of the data set(s) the program
should add a timestamp to the storage file with the current time and date given
by a C pre-defined function of the time.h library.
• For this program, consider that one set of data entry is composed by Body
Temperature in Celsius (BTC), Heart Rate Per Minute (HRPM), Blood Pressure
High (BPH) and Blood Pressure Low (BPL). The data is entered by each
acronym of the parameter being measured and its current value, for example,
BTC 37.2, HRPM 60, BPH 13.1, BPL 7.5.
• The name of the storage file should be VitalSigns_log.dat.
Assume that the job interviewer also told you to take the last digit of your QMUL
student ID and implement the program using a character file output if the last digit of
your ID is an even number or using a non-formatted file output if the last digit of your
ID is an odd number. The C program needs to apply the studied File I/O opening and
closing procedures, and it must return appropriate messages to the user file functions
are unsuccessful.
To simplify your code, take in account the notes below.
Notes:
1. Acronyms are ready for reading, i.e., you do not need to convert anything to
acronyms.
2. Inside the code you must add meaningful explanatory comments to all major
commands and semantics of what the control structures are performing in
relation to the realisation of your unique program. Comments must be short,
clear, and objective about how the code will perform.

Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr