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
Try This:
#include int main(){ int *ptr = 0; ptr++; printf("Size of int: %d",ptr); return 0;