Search
 
SCRIPT & CODE EXAMPLE
 

CPP

sizeof operator in c++

cout << "char: " << sizeof(char) << endl;
cout << "int: " << sizeof(int) << endl;
cout << "float: " << sizeof(float) << endl;
cout << "double: " << sizeof(double) << endl;
Comment

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;
Comment

PREVIOUS NEXT
Code Example
Cpp :: how to append to a vector c++ 
Cpp :: c++ fstream create if not exists 
Cpp :: min in c++ 
Cpp :: how to reverse a string in c++ 
Cpp :: c++ vector resize 
Cpp :: C++ Vector Operation Add Element 
Cpp :: union of two arrays leetcode 
Cpp :: how to square a number in c++ 
Cpp :: chudnovsky algorithm c++ 
Cpp :: image shapes in opencv c++ 
Cpp :: c++ filesystem read directory 
Cpp :: integer to char c++ 
Cpp :: c++ print out workds 
Cpp :: c define 
Cpp :: print pattern and space in cpp 
Cpp :: how can we create 4 digit random number in c++ 
Cpp :: c++ in cmd 
Cpp :: how to print in new lines in C++ 
Cpp :: c++ multiple inheritance 
Cpp :: how to concatenate two vectors in c++ 
Cpp :: map in c 
Cpp :: access last element of set c++ 
Cpp :: search by value in map in stl/cpp 
Cpp :: abstraction in cpp 
Cpp :: c++ check if key exists in map 
Cpp :: cpp read from file 
Cpp :: c++ convert int to cstring 
Cpp :: c++ polymorphism 
Cpp :: how to use for c++ 
Cpp :: modular exponentiation algorithm c++ 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =