Thus, the output is 40. The sizeof Operator The sizeof operator returns the number of bytes the operand occupies in memory.
It is
a
unary operator. Please remember the following points regarding the sizeof operator: 1. The sizeof operator has the same precedence as prefix increment/decrement operators.
2. The parentheses used with sizeof are required when the operand is a data type. With variables
or constants, the parentheses are not necessary.
For example,
#include void main( )
{
printf(“\n%d”, sizeof(int));
printf(“\n%d”, sizeof(long));
printf(“\n%d”, sizeof(float));
printf(“\n%d”, sizeof(double));
printf(“\n%d”, sizeof(long double));