int main(void) { int x = 12345; printf("%+08d\n", x); return 0; }
符号付きにするために +、ゼロ埋めにするために 0、全体8文字にするために 8、int型なので d で、変換指定子 %+08d となります。