It didnt sell 40 million......only album that ever did that was Thriller, as said in the other thread.
It did sell ALOT though, probably 20-25 million (10 million+ in US).
Nobody knows who sold more worldwide, but if Pac sold more in the US, my bet would be on him that he sold more worldwide also. You never know though. A rep from Interscope told me that Pac has sold over 70 million albums worldwide, and that was over 2 years ago, before Resurrection came out.