Storage Classes

⏩Storage Class defined for a Variable determines the accessibility and longevity of a variable.
⏩The accessibility of the variable relates to the portion for the program that has access to the variable.
⏩The longevity of the variable refers to the length of time the variable exists within the program.

Automatic:

➣variable defined within the function body are called automatic variables.
Auto is the keyword used to declare automatic variables.
➣By default and without use of a keyword, the variables defined inside a function are automatic variables.

External:

➣External variables are also called global Variables.
➣External  variables are defined outside an function , memory is set a side once it has been declared and remains until the end of the program.
➣These functions are accessible by any Function.
➣This is mainly utilized when a programmer wants to make use of a variable and access the variable among different function calls.

Static:

➣The static automatic variables, as with local variables, are accessible only within the function in which it is defined.
➣static automatic variables exist until the program ends in the same manner as external variables.
➣In order to maintain value between function calls, the static variables takes its presence,

Comments

Popular posts from this blog

Covid-19 Analysis and Visualization using Plotly Express

Artificial Intelligence (Problem Solving)

Linear Regression