A is equal to 0 because A only has 32-bits, so of course you are shifting all the bits off to the left leaving only 0 bits left. You need to make A 64-bit:
unsigned long long A = (1ULL << 37);
Or if you intend to use Visual C++:
unsigned __int64 A = (1ULL << 37);