先上标准例程
#include <stdio.h>void 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 %ld\n",a,b,c);printf ("Uchar %bu Uint %u Ulong %lu\n",x,y,z);printf ("xchar %bx xint %x xlong %lx\n",x,y,z);printf ("String %s is at address %p\n",buf,p);printf ("%f != %g\n", f, g);printf ("%*f != %*g\n", 8, f, 8, g);}
打开来源
此处有详细介绍
此处使用的版本
特此记录
anlog
7月20日