unsigned long long int ????

Liguo Song liguo.song@vanderbilt.edu
Thu Oct 12 08:43:00 GMT 2000


In the manual of GCC, it stated that long long int (64 bits) is
supported. But, I failed to make use of it in my program.

The following program would compile fine, but gives me the wrong output.
(0FFFFFFFF and 1FFFFFFFF).

The version number of the gcc that I am using is egcs-2.91.66.

Two questions:
    1. How to successfully printf the long long int?
    2. What else I need to do to make it work?

Thanks for any help!


Liguo (Leo)


**********************************************
int main()
{
    unsigned long long int l = 0xFFFFFFFF00000000;

    printf("%X%X\n", l);
    printf("%X%X\n", l+1ULL);
}





More information about the Gcc-help mailing list