me32 = 45933945; printf("Frist, assume int32_t is int: "); printf("me32 = %d\n", me32); printf("Next, let's not make any assumptions.\n"); printf("Instead, use a \"macro\" from inttypes.h: "); printf("me32 = %" PRId32 "\n", me32);
printf("%f can be written %e\n", aboat, aboat); printf("And it's %a in hexadecimal, powers of 2 notation\n", aboat); printf("%f can be written %e\n", abet, abet); printf("%Lf can be written %Le\n", dip, dip);
#include<stdio.h> intmain(void) { printf("Type int has a size of %zd bytes.\n", sizeof(int)); printf("Type char has a size of %zd bytes.\n", sizeof(char)); printf("Type long has a size of %zd bytes.\n", sizeof(long)); printf("Type long long has a size of %zd bytes.\n", sizeof(longlong)); printf("Type double has a size of %zd bytes.\n", sizeof(double)); printf("Type long double has a size of %zd bytes.\n", sizeof(longdouble));