Question discussion

Which of the following statements is INCORRECT about the storage classes in C?

359249Medium DSSSB TGT Computer Science 0 replies 0 views
0
Which of the following statements is INCORRECT about the storage classes in C?
  • AThe scope of variable in automatic storage class is local to the block in which the variable is defined.
  • BIn Register storage class, the default initial value of the variable is zero.
  • CIn static storage class, the default initial value of the variable is zero.
  • DIn Register storage class, the storage of a variable is CPU register.
Correct answer: B

Explanation

Register variables have an indeterminate (garbage) initial value, not zero, so option 2 is incorrect.

Discussion 0

Nobody has replied yet. Start the discussion!