Assuming 4 byte ints here:
t.x = 0;
write four 0 bytes into the union. That overwrites all the elements in arr[].
t.arr[1] = 'G';
writes a 'G' into the second byte of the union. There are still 3 zero-bytes: one before the G and two after the G.
printf("%s", t.arr);
prints up to the first 0 byte in t.arr, which is the first byte in t.arr because you wrote 4 zeroes into the union. No output.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…