I have the followig code and I want to know why I have the following output:
#include <iostream>
int main() {
    double nValue = 5;
    void *pVoid = &nValue;
    short *pInt = static_cast<short*>(pVoid);
    std::cout << *pInt << std::endl; 
    return 0;
}
And it outputs me '0'. I want to know why is this happening. Thank you!
 
     
     
     
    