This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

unsigned long long int ????


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);
}




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]