for example:
int a[] = {1,2};
cout << (bool) a;
output: 1
this because the pointer that points to the first element is not a null pointer
but this confuses me :
int a[0];
cout << (bool) a;
output: 1
how this will be 1 and how there is a pointer that not null and there is no elements in array ?
I want a detailed explanation how a zero-length array is allocated in memory.