先上标准例程
#includevoid tst_printf (void) { char a; int b; long c; unsigned char x; unsigned int y; unsigned long z; float f,g; char buf [] = "Test String"; char *p = buf; a = 1; b = 12365; c = 0x7FFFFFFF; x = 'A'; y = 54321; z = 0x4A6F6E00; f = 10.0; g = 22.95; printf ("char %bd int %d long %ldn",a,b,c); printf ("Uchar %bu Uint %u Ulong %lun",x,y,z); printf ("xchar %bx xint %x xlong %lxn",x,y,z); printf ("String %s is at address %pn",buf,p); printf ("%f != %gn", f, g); printf ("%*f != %*gn", 8, f, 8, g); }
打开来源
此处有详细介绍
此处使用的版本
特此记录
anlog
2022年7月20日



