Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ to find size of char

#include <iostream>
using namespace std;

int main(){    
    cout << "Size of char: " << sizeof(char) << " byte" << endl;
    cout << "Size of int: " << sizeof(int) << " bytes" << endl;
    cout << "Size of float: " << sizeof(float) << " bytes" << endl;
    cout << "Size of double: " << sizeof(double) << " bytes" << endl;

    return 0;
}
Source by www.cplusplus.com #
 
PREVIOUS NEXT
Tagged: #find #size #char
ADD COMMENT
Topic
Name
4+7 =