Bamboozled by long long
arijitg@uci.edu
arijitg@uci.edu
Fri Jul 19 11:17:00 GMT 2002
I have the following 2 lines in a program
unsigned long long k=1;
unsigned int i = 4;
printf("The values are i: %d, , k: %lX, i+k: %lX \n", i,k , i+k);
k = k + i;
printf("The values are i: %d, , k: %lX, i+k: %lX \n", i,k , i+k);
I get the foll. outputs:
The values are i: 4, , k: 0, i+k: 1
The values are i: 4, , k: 0, i+k: 5
Note that (i+k) is showing k's current value, yet k is always showing
0.
Any idea please?
More information about the Gcc-help
mailing list