We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1
Storage Class
Subject: Problem-Solving Using C
Raj Ku. Baliyar Singh, Asst. Professor, Dept. CSE, NIST (Auto)
Variable in C programming has two properties: type and storage class.
Type refers to the data type of a variable. And, storage class determines the scope, visibility, and lifetime of a variable. Storage Class specifiers in C are an important topic of memory management in C. The Storage class defines the following attributes of a variable: Scope (Visibility of a variable): The scope of a variable says where the variable is accessible and where not in the program. The scope of a variable is determined at compile- time only without creating any function call stack in which it is created which happens at run-time. Default definition value: Memory allocation does not happen in the declaration whereas in definition memory gets allocated to the variable. Lifetime: The lifetime of a variable refers to its validity, that for how long we can access it in the program in its permitted scope.