例如 %16s 右对齐; %-16s 左对齐; 场宽16:
#include
int main()
{
int i,j;
char a[][4][16]={"A:956->956","A:000","A:000","A:000",
"B:154","B:JJJ","B:JJJ","B:JJJ"};
for (j=0;j<2;j++){
for (i=0;i<4;i++)printf("|%16s|", a[j][i]); printf("\n");
};
for (i=0;i<72;i++)printf("=");printf("\n");
for (j=0;j<2;j++){
for (i=0;i<4;i++)printf("|%-16s|", a[j][i]); printf("\n");
};
return 0;
}