Examveda

What is the default value of an uninitialized 'static' variable in C?

A. Zero

B. Undefined

C. Garbage value

D. one

Answer: Option A

Solution (By Examveda Team)

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.

This Question Belongs to C Program >> Storage Class

Join The Discussion

Comments (1)

  1. Ganesh Paindla's
    Ganesh Paindla's:
    2 years ago

    answer not c, its A bcz uninitialized static variable store 0 not garbage value

Related Questions on Storage Class