Question: Code should be written in C Write a program that uses the X library to display a clock. The program should use the ctime() function

Code should be written in C
Write a program that uses the X library to display a clock. The program should use the ctime() function to obtain the current time. The time should be display as text in HH:MM:SS format, where HH is the current hour, MM is the current minute, and SS is the current second. The display should be updated once per second, controlled using the sleep() function. The time should be displayed using the XDrawString() function in the center of a window created by the program. The program should run indefinitely
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
