Q5. Find the size of structure without using sizeof() operator.
To find size of a structure. We can use a pointer as we know if we increment structure pointer by one it will incremented by size of that structure, see below.
int size_of_structure = 0;
struct find_size *a = 0;
size_of_structure = ((char *)(a + 1)) – ((char *)a);
printf(“size_of_structure = %d\n”,size_of_structure);