Given pseudocode:
Pointer *p where *p = arbitrary length array of items A
NOT knowing what the length of A is before hand, but you know the type of A, is there a way to determine the length of the array?
Ahh, but there's a catch! You don't know what, if any termination unit is the array.
For example, given a string:
char p[] = "Some string"
The common delimiter is null, which is what strlen uses to find the end of the string. However what about the case that you may unknowningly be parsing, say, a unicode string in which case it looks like every other character is a null (in ANSI).
Basically, without explicitly knowing the length of the array, is there any way to find it's length pro grammatically?
Pointer *p where *p = arbitrary length array of items A
NOT knowing what the length of A is before hand, but you know the type of A, is there a way to determine the length of the array?
Ahh, but there's a catch! You don't know what, if any termination unit is the array.
For example, given a string:
char p[] = "Some string"
The common delimiter is null, which is what strlen uses to find the end of the string. However what about the case that you may unknowningly be parsing, say, a unicode string in which case it looks like every other character is a null (in ANSI).
Basically, without explicitly knowing the length of the array, is there any way to find it's length pro grammatically?
