I have a data type, say X, and I want to know its size without declaring a variable or pointer of that type and of course without using sizeof oper
X
sizeof
if X is datatype:
#define SIZEOF(X) (unsigned int)( (X *)0+1 )
if X is a variable:
#define SIZEOF(X) (unsigned int)( (char *)(&X+1)-(char *)(&X) )