A
Amol
Consider the following.
#define UBOUND(x) sizeof(x)/sizeof(*x)
int main() {
int a[20] = {0};
cout << UBOUND(a) << endl; // prints 20
int* p = new int[20];
cout << UBOUND(p) << endl; // prints somthing different; on my
platform 1.
}
why is that so?
#define UBOUND(x) sizeof(x)/sizeof(*x)
int main() {
int a[20] = {0};
cout << UBOUND(a) << endl; // prints 20
int* p = new int[20];
cout << UBOUND(p) << endl; // prints somthing different; on my
platform 1.
}
why is that so?