基础概念
#include <stdio.h>void main()
{
int a = 150000;
float b = 123.1234567;
double c = 12345678.1234567;
char d = 'p';
printf("a=%d,%5d,%o,%x\n",a,a,a,a);
printf("b=%f,%lf,%5.4lf,%e\n",b,b,b,b);
printf("c=%lf,%f,%8.4lf\n",c,c,c);
printf("d=%c,%8c\n",d,d);
}
请问这里的%8c的意义是什么? 输出字符,宽度为8,如果输出的对象不足8个字符用空格补齐
页:
[1]