Skip to content
Related Articles

Related Articles

C | Storage Classes and Type Qualifiers | Question 12
  • Difficulty Level : Easy
  • Last Updated : 15 Feb, 2013

In C, static storage class cannot be used with:
(A) Global variable
(B) Function parameter
(C) Function name
(D) Local variable


Answer: (B)

Explanation: Declaring a global variable as static limits its scope to the same file in which it is defined.
A static function is only accessible to the same file in which it is defined.
A local variable declared as static preserves the value of the variable between the function calls.

Want to learn from the best curated videos and practice problems, check out the C Foundation Course for Basic to Advanced C.
My Personal Notes arrow_drop_up
Recommended Articles
Page :