#define ELEMENT_COUNT(a)\
sizeof(a)/sizeof(a[0])
int main()
{
int a[3] = {1,2,3};
int* b = new int[3];
int* c;
cout<<ELEMENT_COUNT(a);
cout<<ELEMENT_COUNT(b);
cout<<ELEMENT_COUNT(c);
}
None of the available options are correct. sizeof(b) and sizeof(c) are dependent on the platform pointer size
2018 Nov 7, 9:12:25 PM
Login in to like
Login in to comment