
18 Data Structures Using C
1.9.5 Some Special Operators
There are many other operators in C. In this section, the two frequently used operators—sizeof and
comma operators—have been discussed.
1. Sizeof operator: C provides a compile time unary operator called sizeof which, when applied
on an operand, returns the number of bytes the operand occupies in the main memory. The
operand could be a variable, a constant or a data type. For example, the following expressions:
a 5 sizeof (“sum”);
b 5 sizeof (char);
c 5 sizeof (123L);
would return the sizes occupied by variables sum, data type char and constant ‘123L’ on your machine.
It may be noted tha