How will you find size of a structure without using size of 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);
}

1 comment:

anil said...

in printf statement *ptr must be ptr .