Question: Write a C++ program called epoch.cpp that uses the system command date to display the time and date in a specic format. Your C++ program

Write a

C++ program called epoch.cpp that uses the system command

date to display the time and date in a specic format. Your C++ program should first

request a Unix epoch (elapsed seconds since 1 Jan 1970) and then invoke the command

date two times. First, to display the time the specied epoch represents in the format

HH:MM:SS and then the date the specied epoch represents in the format Weekday Day

Month Year.

Example output:

user~$ make run

./epoch

Enter unix epoch: 1550000000

21:33:20

Tuesday 12 February 2019

important:

Your program should be using C++ functions like execve() and friends to execute

system commands.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!