Hello,
When I try to print an unsigned long long int I get a different number displayed.
This is the code I'm using:
Code:
int main(int argc, char *argv[]) {
printf ( "ULLONG_MAX: %llu\n", ULLONG_MAX );
unsigned long long int power=atoi(argv[1]);
unsigned long long int shift_power=0;
printf("normal, %llu\n", power);
shift_power=power<<10;
printf("after shift, %llu\n", shift_power);
...
running it with:
> ./test 35184372088832
the result is:
ULLONG_MAX: 18446744073709551615
normal, 0
after shift, 0
Any idea please? do you know why I'm getting 0 for both?
thx in advance