I was playing around with pointers and decided to see how big a pointer was. It seemed the pointer was 4 bytes in size, 32 bits. However, I have 8GB Ram, which comes to 2^36 bits. So wouldn't the pointer need at least be 36 bits to address all possible addresses?
#include <iostream> using std::cout; using std::endl; int main() { long long myVar = 0; long long* myPointer = &myVar; cout << sizeof(myVar) << endl; // 8 cout << sizeof(myPointer) << endl; // 4 cout << endl << endl; system("pause"); return 0; }