Vidyalelo
C Programming · Q75

Operators and Expressions

Programming · C Programming · question 75

Q75

Which of the following cannot be used inside sizeof?

A.
pointers
B.
functions
Answer
C.
macro definition
D.
none of the mentioned

Answer: Option B

Solution

Answer: Option B
Solution:
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.