Help with long's

I must bee doing something wrong, but I am having real difficulty in getting the arduino to do a relatively simple sum

I have

unsigned long k;

k=8*10000;

Serial.print("sum");
Serial.print(k);

it just returns 0 as the output
which I though might be it overflowing, but isnt an unsigned long supposed to be able to cope with bigger than this?

Not sure why you say that you get 0, the code you posted should print “sum14464”.

Anyway, the math will be done using the highest precision type in the expression, in your example, no type is explicit so int is used. Therefore the expression will truncate 80000 (13880 Hex) to 14464 (3880 Hex) . To prevent truncating, set one of the values to a long:
k=8*10000L; // the L at the end tell the compiler to treat the value as a long