For starters in expressions, with rare exceptions including the sizeof operator, arrays are implicitly converted to pointers to their element types.
So for example the array
int16_t data[NUM_TRACKS][NUM_SAMPLES];
is converted in expressions like
int16_t ( *data )[NUM_SAMPLES];
not as you wrote in a comment like
int16_t** data
However a declaration is not an expression. So the sizeof operator returns the number of bytes to accommodate all data members of the structure without any implicit conversion.
From the C Standard (6.5.3.4 The sizeof and alignof operators)
2 The sizeof operator yields the size (in bytes) of its operand, which
may be an expression or the parenthesized name of a type. The size is
determined from the type of the operand. The result is an integer. If
the type of the operand is a variable length array type, the operand
Here is a demonstrative program
#include <stdio.h>
int main(void)
{
enum { N = 10 };
int a[N];
printf( "sizeof( a ) = %zu\n", sizeof( a ) );
struct A
{
int a[N];
};
printf( "sizeof( struct A ) = %zu\n", sizeof( struct A ) );
return 0;
}
Its output is
sizeof( a ) = 40
sizeof( struct A ) = 40
sizeofwill give you the size you need to store the object. The arrays are within the object itself, not pointed to by it.typedef struct _DATA_PROC { uint16_t* count; int16_t** data; } tDataProcessing;— at least, it can't claim to be a standard-conforming C compiler if it does.