How many bytes is unsigned long long?

前端 未结 4 716
挽巷
挽巷 2020-11-27 17:10

How many bytes is unsigned long long? Is it the same as unsigned long long int ?

4条回答
  •  庸人自扰
    2020-11-27 17:44

    Use the operator sizeof, it will give you the size of a type expressed in byte. One byte is eight bits. See the following program:

    #include 
    
    int main(int,char**)
    {
     std::cout << "unsigned long long " << sizeof(unsigned long long) << "\n";
     std::cout << "unsigned long long int " << sizeof(unsigned long long int) << "\n";
     return 0;
    }
    

提交回复
热议问题