How are you displaying the return value?
I tried the above code and it worked fine with 1048576, using Visual Studio 2005.