Answers for "size() c++"

C++
1

set size in c++

set<int> setTemp {12,23,34,45,56,67};
int setLen = setTemp.size();
cout<<setLen<<endl;

// output:   6
Posted by: Guest on March-06-2022
1

C++ SizeOf

cout << "The sizeof(char) is " << sizeof(char) << " byte/s" << endl;
    cout << "The sizeof(short) is " << sizeof(short) << " byte/s" << endl;
    cout << "The sizeof(int) is " << sizeof(int) << " byte/s" << endl;
    cout << "The sizeof(long) is " << sizeof(long) << " byte/s" << endl;
    cout << "The sizeof(long long) is " << sizeof(long long) << " byte/s" << endl;
    cout << "The sizeof(float) is " << sizeof(float) << " byte/s" << endl;
    cout << "The sizeof(double) is " << sizeof(double) << " byte/s" << endl;
    cout << "The sizeof(long double) is " << sizeof(long double) << " byte/s" << endl;
    cout << "The sizeof(bool) is " << sizeof(bool) << " byte/s" << endl;
Posted by: Guest on March-09-2022

Browse Popular Code Answers by Language