Find size of a struct without using sizeof operator

How will you find the size of a structure in C/C++ language without using sizeof operator. (Note: sum of sizes of all fields of a […]

Using sizeof to get size of an Array or pointer

sizeof operator returns size in bytes. For example, In an implementation where 2 bytes (16bits) of memory is allocated to an int type, the below code will […]

sizeof operator in C/Cpp language

sizeof is a unique operator in C/C++ language which returns the amount of memory (in bytes) allocated to its operand. For example, if an implementation stores […]