What is the difference between unsigned long and unsigned long long?
I expected that the size will be different. But both are showing 8bytes. #include <iostream> using namespace std; int main() { cout<<"Size of long:"<<sizeof(unsigned long)<<"\n"; cout<<"Size of Long Long:"<< sizeof(unsigned long long)<<"\n"; } Output: Size of long:8 Size of Long Long:8 They're two distinct types, even if they happen to have the same size and representation in some particular implementation. unsigned long is required to be at least 32 bits. unsigned long long is required to be at least 64 bits. (Actually the requirements are stated in terms of the ranges of values they can