Define a structure of type hms containing three integer numbers, called hour, minute and second, respectively. Then define a union containing two members, each a structure of type hms. Call the union members local and home, respectively. Declare a pointer variable called time that points to this union.

#include<stdio.h>
struct hms
{
    int hour;
    int minute;
    int second;
};

union
{
    struct hms local;
    struct hms home;
}*time;

int main(void)
{
    return 0;
}

Comments