Why is the size of the returned pointer, r, equal to four? And why, in (cout << "(" << sizeof(e(i))... ), the e(i) value is returned, but the (cout) in the same e(i) does not print "Hello"? Thanks for help...
Thanks...
Code:
// obs! --> jpkg-msg
#include <iostream>
using namespace std;
double* const e(double * const);
int main() {
double i[11];
cout << "The number of elements: "\
<< sizeof(i)/sizeof(*i) << endl;
cout << "(" << sizeof(e(i)) << ", "\
<< sizeof(*(e(i))) << ")" << endl;
return 0;
}
double* const e(double * const r) {
cout << "Hello!" << endl;
return r;
}
Comment