Which of the following cannot be used inside sizeof?
A. pointers
B. functions
C. macro definition
D. none of the mentioned
Answer: Option B
Solution (By Examveda Team)
sizeof is a compile-time operator in C that determines the size, in bytes, of a variable or data type.Option A: pointers – Valid. sizeof can be used with pointers to determine the size of the pointer type.
Option B: functions – Invalid. You cannot use sizeof on functions because functions do not have a defined size at compile time. sizeof requires a complete type, and functions are not complete objects in C.
Option C: macro definition – Valid. If the macro expands to a valid expression or type, sizeof can be used on it.
Option D: none of the mentioned – Incorrect because functions cannot be used with sizeof.
Therefore, the correct answer is Option B: functions.
Join The Discussion
Comments (3)
Related Questions on Operators and Expressions
What does the ++ operator do in C when applied to a variable?
A. Decrements by 1
B. Adds 1
C. Doubles the value
D. Leaves it unchanged

❌ Not allowed directly
You cannot use sizeof(function_name) because a function doesn't have a size in C.
However, you can use sizeof(&function_name), because that gives you a function pointer, which does have a size.
So sizeof(main) is invalid, but sizeof(&main) is valid.
❌ Not allowed directly
You cannot use sizeof(function_name) because a function doesn't have a size in C.
However, you can use sizeof(&function_name), because that gives you a function pointer, which does have a size.
So sizeof(main) is invalid, but sizeof(&main) is valid.
The void type means no type—it's an incomplete type, meaning it cannot have a size.
You cannot apply sizeof to void directly in standard C.
Doing so will typically result in a compiler error, like: