[ create a new paste ] login | about

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

C++, pasted on Aug 21:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <iostream>
#include <cmath>
using namespace std;

int main()
{
    char *chr_pA;
    int *int_pB;
    double *dbl_pC;
    int intD=0;
    intD=sizeof(chr_pA);
    cout << "char point size=" << intD << endl;
    intD=sizeof(int_pB);
    cout << "int point size=" << intD << endl;
    intD=sizeof(dbl_pC);
    cout << "double point size=" << intD <<endl;
    cout << "The C++ compiler is " << (8*intD) << " Bits"<<endl;
    cout << "The APP can use max of main memory size that is " <<pow((float)2,(float)(8*intD)) << " Bytes"  <<endl;
    return 0;
}


Output:
1
2
3
4
5
char point size=4
int point size=4
double point size=4
The C++ compiler is 32 Bits
The APP can use max of main memory size that is 4.29497e+09 Bytes


Create a new paste based on this one


Comments: