1. Engineering
  2. Computer Science
  3. please read through the whole post i have seen way...

Question: please read through the whole post i have seen way...

Question details

Please, read through the whole post. I have seen way too many answers that don't actually fully answer the problem so please stop reposting the same answer from other posts !!!

  • Create a header file called clock.h with the following contents. This will be the interface you will implement as part of this and subsequent tasks. Fill in the definition of the clock data structure that will be used to store your ASCII clock -- the design is entirely up to you.
#ifndef CLOCK_H_
#define CLOCK_H_

typedef struct {
  // TODO: Define your ASCII clock data structure here. 
} ClockType;

// Initialize the clock data structure 
void initClock( ClockType *clock );

// Print an ASCII clock showing cur_time as the time 
void printClock( const time_t cur_time, const ClockType *clock );

// Free up any dynamically allocated memory in the clock
void cleanClock( ClockType *clock);

#endif /* CLOCK_H_ */

In a source file called clock.c, implement the functions in clock.h: initClock, printClock, cleanClock. Do not just print the time on a single line, make each digit at least 8 lines tall for the mandatory tasks in this assignment (as shown in the example output below). You may find the C ctime function helpful. Learn how to use it and related functions from manual pages, cppreference.com or any other reference of your choice.

**Output should be something like this:

a @a 66 f a @@a@

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution