Q28
What is the default value of an uninitialized 'static' variable in C?
A.
Zero
AnswerB.
Undefined
C.
Garbage value
D.
one
Answer: Option A
Solution
Answer: Option A
Solution:
The default value of an uninitialized 'static' variable in C is zero. Unlike automatic variables (which have an undefined value), static variables are automatically initialized to zero if no explicit initialization is provided.