This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Bamboozled by long long
- From: arijitg at uci dot edu
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 19 Jul 2002 11:17:21 -0800
- Subject: Bamboozled by long long
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?