I have recieved many responses to my first message all saying it
is proper for an int to have 4 bytes. So I went back to the original
function that checks int, float, long and char. My GCC sizeof() says all
these types use 4 byte! This just proves more fully that sizeof() is
broken in my Linux. Here is the test program.

/* prints out type sizes */
#include <stdio.h>
int main(void)
{ 
        printf("Type int has a size of %d bytes.\n", sizeof(int));
        printf("Type long has a size of %d bytes.\n", sizeof(long));
        printf("Type float has a size of %d bytes.\n", sizeof(float));
        printf("Type char has a size of %d bytes.\n", sizeof(char));
        return 0;
}


Best wishes 

   - Karl F. Larsen, 3310 East Street, Las Cruces,NM (505) 524-3303  -

Reply via email to