![]() ![]() ![]() | sizeof-floats.c - Et program der 'udregner' bytestørrelsen af float typerne. | Lektion 5 - slide 11 : 24 Program 2 |
/* Compute the size of some fundamental types. */ #include <stdio.h> int main(void) { printf("\n"); printf("Here are the sizes of some floating types:\n\n"); printf(" float:%3d bytes\n", sizeof(float)); printf(" double:%3d bytes\n", sizeof(double)); printf("long double:%3d bytes\n", sizeof(long double)); printf("\n"); return 0; }