Thu Nov 13, 2008 2:25 pm
/*
* Print the sizeof information for the basic numeric types.
*/
#include <stdio.h>
main()
{
char c;
short s;
int i;
unsigned long l;
signed long long ll;
float f;
double d;
long double ld;
printf ("%d %d %d %d %d\n", (int)sizeof c, (int)sizeof s,
(int)sizeof i, (int)sizeof l, (int)sizeof ll);
printf ("%d %d %d\n", (int)sizeof f, (int)sizeof d, (int)sizeof ld);
printf ("%d %d %d\n", (int)sizeof(int), (int)sizeof(char),
(int)sizeof(long double));
}
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.