3 typedef char padding
[16];
51 } padding_long_double
;
54 fill (void *buf
, long sizeof_buf
)
58 for (i
= 0; i
< sizeof_buf
; i
++)
59 p
[i
] = "The quick brown dingo jumped over the layzy dog."[i
];
65 fill (&padding_char
.p1
, sizeof (padding
));
66 fill (&padding_char
.v
, sizeof (padding_char
.v
));
67 fill (&padding_char
.p2
, sizeof (padding
));
69 fill (&padding_short
.p1
, sizeof (padding
));
70 fill (&padding_short
.v
, sizeof (padding_short
.v
));
71 fill (&padding_short
.p2
, sizeof (padding
));
73 fill (&padding_int
.p1
, sizeof (padding
));
74 fill (&padding_int
.v
, sizeof (padding_int
.v
));
75 fill (&padding_int
.p2
, sizeof (padding
));
77 fill (&padding_long
.p1
, sizeof (padding
));
78 fill (&padding_long
.v
, sizeof (padding_long
.v
));
79 fill (&padding_long
.p2
, sizeof (padding
));
81 fill (&padding_long_long
.p1
, sizeof (padding
));
82 fill (&padding_long_long
.v
, sizeof (padding_long_long
.v
));
83 fill (&padding_long_long
.p2
, sizeof (padding
));
85 fill (&padding_float
.p1
, sizeof (padding
));
86 fill (&padding_float
.v
, sizeof (padding_float
.v
));
87 fill (&padding_float
.p2
, sizeof (padding
));
89 fill (&padding_double
.p1
, sizeof (padding
));
90 fill (&padding_double
.v
, sizeof (padding_double
.v
));
91 fill (&padding_double
.p2
, sizeof (padding
));
93 fill (&padding_long_double
.p1
, sizeof (padding
));
94 fill (&padding_long_double
.v
, sizeof (padding_long_double
.v
));
95 fill (&padding_long_double
.p2
, sizeof (padding
));
103 printf ("sizeof (char) == %d\n", sizeof (char));
104 printf ("sizeof (short) == %d\n", sizeof (short));
105 printf ("sizeof (int) == %d\n", sizeof (int));
106 printf ("sizeof (long) == %d\n", sizeof (long));
107 printf ("sizeof (long long) == %d\n", sizeof (long long));
109 printf ("sizeof (void *) == %d\n", sizeof (void*));
110 printf ("sizeof (void (*)(void)) == %d\n", sizeof (void (*)(void)));
112 printf ("sizeof (float) == %d\n", sizeof (float));
113 printf ("sizeof (double) == %d\n", sizeof (double));
114 printf ("sizeof (long double) == %d\n", sizeof (long double));
117 printf ("valueof ('\\377') == %d\n", '\377');
118 printf ("valueof ((int) (char) -1) == %d\n", (int) (char) -1);
119 printf ("valueof ((int) (signed char) -1) == %d\n", (int) (signed char) -1);
120 printf ("valueof ((int) (unsigned char) -1) == %d\n", (int) (unsigned char) -1);