Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 3 a) Assume you are in an interview for a job. The job interviewer asks you to create a simple log application using C

image text in transcribed

Question 3 a) Assume you are in an interview for a job. The job interviewer asks you to create a simple log application using C programming. Assume you must do this in the interviewer's presence, and he gave you 20 minutes for that. The application would log the initials of an employee, the current date, the job number, and the number of hours the employee took to perform that job. The name of the output log file would be job_tracking_log.dat. Assume that the job interviewer also told you to take the 2 last digits of your student ID and implement the program using a non-formatted file output if the last two digits of your ID form an oven number or using a character file output if the last two digits of your ID form an odd number. The program needs to apply the studied File I/O opening and closing procedures, and it must return appropriate messages to the user if the opening of a file is unsuccessful. To simplify your code, take in account notes 1 to 3 below. Note 1: Assume the employee enters their initials in one single string (e.g., John Smith would enter directly "US" to the application without spaces between initials). You do not need to convert full names to initials. Note 2: For the current date, you can enter the year, the month, and the day as separate integral values. Note 3: For the hours, assume the employees will round them up to the nearest half or integral hour (e.g., if an employee worked for 1h and 35 minutes, he/she would enter 2 hours; or if the employee worked 1h 12 minutes, he/she would enter 1.5 hours). Note 4: 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. Hint: You may want to use some of the functions included in the Appendix. [13 marks] b) Assume that your employer asked you to explain to a new trainee in the company how a client communicates with a server. After your explanation, this trainee needs to make a simple program using for this communication. Your explanation should include the major concept with which this inter-process communication can be realised in a program in C. You must include your own diagram that makes your explanation clearer to the trainee. You also need to include references to all the relevant system calls on the server side and on the client side for a successful inter-process communication between them. Your employer will look at your explanation notes after your meeting with the trainee

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 Universal Database V7.1 Application Development Certification Guide

Authors: Steve Sanyal, David Martineau, Kevin Gashyna, Michael Kyprianou

1st Edition

0130913677, 978-0130913678

Students also viewed these Databases questions

Question

What is the average transaction amount for Montana (MT)?

Answered: 1 week ago

Question

=+ a. A change in consumer preferences increases the saving rate.

Answered: 1 week ago