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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education