what about :
char uuid[40];
sprintf(uuid, "%8.8x-%4.4x-%4.4x-%2.2x%2.2x-%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x",
u.time_low, u.time_mid, u.time_hi_and_version, u.clock_seq_hi_and_reserved,
u.clock_seq_low, u.node[0], u.node[1], u.node[2], u.node[3], u.node[4], u.node[5]);
printf("%s\n", uuid);