Interview Questions and Answers :: Aricent
Home > Experience Archives > Aricent > Interview Question Set 1 > Discussion
3. Sizeof if operator or macro or inline function.
Answer:
sizeof is an operator, when it get called it replace the sizeof variable.
#define size_of(type) ((char *) (&type +1)) - ((char *)&type)
Amit
9 Jul, 2018 10:15 AM
sizeof is an operator, when it get called it replace the sizeof variable.
#define size_of(type) ((char *) (&type +1)) - ((char *)&type)
Report Error
Report Error
Please Login First Click Here