#include <stdio.h>
#include <stdlib.h>
typedef struct
{
int hours;
int minutes;
int seconds;
} Time;
void time_print(Time t)
{
printf("Time is: %d:%d:%d\n", t.
hours, t.
minutes, t.
seconds); }
int main(void)
{
Time *testTimePointers[2];
testTimePointers
[0] = malloc(sizeof(Time
)); testTimePointers[0]->hours = 11;
testTimePointers[0]->minutes = 10;
testTimePointers[0]->seconds = 9;
testTimePointers
[1] = malloc(sizeof(Time
)); testTimePointers[1]->hours = 7;
testTimePointers[1]->minutes = 6;
testTimePointers[1]->seconds = 5;
time_print(*(testTimePointers[0]));
time_print(*(testTimePointers[1]));
Time **ttp_cur_p = testTimePointers;
time_print(*(*ttp_cur_p));
ttp_cur_p++;
time_print(*(*ttp_cur_p));
free(testTimePointers
[0]); free(testTimePointers
[1]);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCnR5cGVkZWYgc3RydWN0CnsKICAgIGludCBob3VyczsKICAgIGludCBtaW51dGVzOwogICAgaW50IHNlY29uZHM7Cn0gVGltZTsKCnZvaWQgdGltZV9wcmludChUaW1lIHQpCnsKICAgIHByaW50ZigiVGltZSBpczogJWQ6JWQ6JWRcbiIsIHQuaG91cnMsIHQubWludXRlcywgdC5zZWNvbmRzKTsKfQoKaW50IG1haW4odm9pZCkKeyAgICAKICAgIFRpbWUgKnRlc3RUaW1lUG9pbnRlcnNbMl07CgogICAgdGVzdFRpbWVQb2ludGVyc1swXSA9IG1hbGxvYyhzaXplb2YoVGltZSkpOwogICAgdGVzdFRpbWVQb2ludGVyc1swXS0+aG91cnMgPSAxMTsKICAgIHRlc3RUaW1lUG9pbnRlcnNbMF0tPm1pbnV0ZXMgPSAxMDsKICAgIHRlc3RUaW1lUG9pbnRlcnNbMF0tPnNlY29uZHMgPSA5OwoKICAgIHRlc3RUaW1lUG9pbnRlcnNbMV0gPSBtYWxsb2Moc2l6ZW9mKFRpbWUpKTsKICAgIHRlc3RUaW1lUG9pbnRlc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