I have the following code segment I am testing for an encryption program I am to wirte. Namely the blowfish algorithm. I am to input from the command line up to a 64 bit hex number and convert it to a base ten number. I am using the code segment on a Dell 64 bit server with ubuntu server 64 installed using gcc from the command line. What seems to be happening is it is only converting the first 32 bits. Here is what I am inputing:
and this is what my output is:
Here is my code segment:
What am I doing incorrect here and what can be done to correct it.
unsigned long long ul;
printf("Enter an unsigned number: ");
fgets(buffer, 64, stdin);
ul = strtoull (buffer, NULL, 16);
printf("Output: %llu\n", ul);
Thanks in advance!