[ create a new paste ] login | about

Link: http://codepad.org/ikdwVjfM    [ raw code | output | fork ]

C++, pasted on Jan 22:
1
2
3
4
5
6
7
8
9
10
11
12
#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;
}


Output:
1
2
3
4
Size of char: 1 byte
Size of int: 4 bytes
Size of float: 4 bytes
Size of double: 8 bytes


Create a new paste based on this one


Comments: