Problem Solving Through C (BCA) 1st Sem Previous Year Solved Question Paper 2022

Practice Mode:
22.

What is the use of static storage class ?

Explanation

The static storage class in C is primarily used for two purposes:

  1. Retaining Value: Variables declared as static retain their values between function calls. They are initialized only once and hold their values throughout the program's execution.

  2. Local Scope: Variables with static storage class are limited to the scope of the function or block in which they are declared but have a longer lifetime than automatic variables.