Search⌘ K

Challenge: Convert 2-Bytes Time Into Hours, Minutes, and Seconds

Explore how to extract hours minutes and seconds from a 2-byte time field in C. This lesson helps you practice bit manipulation by implementing the displayTime function that stores the converted values in an array.

Problem statement

In this challenge, you have to implement the displayTime function.

void displayTime(unsigned short int tm , unsigned short int arr[3]);

You are given a 2-byte ...