WARNING: BLOAT
Name:
Anonymous
2008-02-05 9:06
SICKENING, SIRS, SICKENING
AN INT TAKES THE SAME AMOUNT OF MEMORY AS A LONG!!
YOU CAN TEST IT YOURSELF !!
WARNING:THIS WILL DISGUST YOU
#include <stdio.h>
#include <stdlib.h>
int main()
{
char c;
int i;
long l;
printf( "A char is this big: %d\n", sizeof(c) );
printf( "An int is this big: %d\n", sizeof(i) );
printf( "A long is this big: %d\n", sizeof(l) );
}
Name:
Anonymous
2008-02-05 21:51
improved guifications
c.patch
10,11c10,11
< printf( "A char is this big: |" );
< while( i > 0)
---
printf( "A char is this big: 8" );
while( i > 0)
13c13
< printf( "-" );
---
printf( "=" );
15,16c15,16
< }
< printf( "|\n" );
---
}
printf( "D\n" );
20c20
< printf( "An int is this big: |" );
---
printf( "An int is this big: 8" );
23c23
< printf( "-" );
---
printf( "=" );
26c26
< printf( "|\n" );
---
printf( "D\n" );
30c30
< printf( "A short is this big: |" );
---
printf( "A short is this big: 8" );
33c33
< printf( "-" );
---
printf( "=" );
36c36
< printf( "|\n" );
---
printf( "D\n" );
40c40
< printf( "A long is this big: |" );
---
printf( "A long is this big: 8" );
43c43
< printf( "-" );
---
printf( "=" );
46c46
< printf( "|\n" );
---
printf( "D\n" );
Name:
Anonymous
2008-02-05 21:53
b.c
#include <stdio.h>
#include <stdlib.h>
int main()
{
int i;
i = sizeof(char);
printf( "A char is this big: 8" );
while( i > 0)
{
printf( "=" );
--i;
}
printf( "D\n" );
i = sizeof(int);
printf( "An int is this big: 8" );
while( i > 0)
{
printf( "=" );
--i;
}
printf( "D\n" );
i = sizeof(short);
printf( "A short is this big: 8" );
while( i > 0)
{
printf( "=" );
--i;
}
printf( "D\n" );
i = sizeof(long);
printf( "A long is this big: 8" );
while( i > 0)
{
printf( "=" );
--i;
}
printf( "D\n" );
return 0;
}
Newer Posts