Find out size of any structure without using sizeof operator?

struct  ABC{
    int a;
    float b;
    char c;
};
void main(){
    struct ABC *ptr=(struct ABC *)0;
    ptr++;
    printf("Size of structure is: %d",*ptr);
}

Explanation:
Read pointer arithmetic

No comments: