Explain advantage of static storage class, Computer Engineering

Assignment Help:

Explain advantage of static storage class

The second and more subtle use of 'static' is in connection with external declarations. With external constructs it provides a privacy mechanism that is very important for program modularity. By privacy, we mean visiblilty or scope restrictions on otherwise accessible variables or functions. The difference between 'extern' and 'static extern' is that static external variables are scope-restricted external variables. The scope is the remainder of the source file in which they are declared. Thus, they are unavailable to functions defined earlier in the file or to functions defined in other files, even if these functions attempt use the 'extern' storage class keyword.

Example:

void f()

{

}

Statements;      /* count is not available here */

static int count;         /* Static External Variable*/

void s()

{

 Statemetns;      /* count can be used here */

 }

 


Related Discussions:- Explain advantage of static storage class

Describe the horizontal frequency or cycle, Q. Describe the Horizontal Freq...

Q. Describe the Horizontal Frequency or cycle? Horizontal Frequency: The time to scan one line connecting the right edge to left edge of the screen horizontally is known as t

Array of discount rates, Why do you think you are asked to do valuation giv...

Why do you think you are asked to do valuation given an array of discount rates? a.    Would it not be extra accurate to utilize, for intsnces , CAPM to calculate cost of equity

Explain about the term e-cash, Explain about the term E-Cash. E-cash is...

Explain about the term E-Cash. E-cash is cash demonstrated by two models. E-cash has one is on-line form of e-cash, that is introduced by DigiCash that permits for the completi

Difference between field-group header and other field groups, What is the d...

What is the difference between field-group header and other field groups? The header field group is a particular field group for the sort criteria.  The system automatically p

Mplement a second-order low-pass filter using the finite dif, you will impl...

you will implement a second-order low-pass filter using the finite difference method. The finite difference method is a useful mathematical method that is used to numerically solve

#title.sequential circuit, design modulo 12 up synchronous counter using t ...

design modulo 12 up synchronous counter using t flip flop

State the benefits of encapsulation, State The Benefits of Encapsulation ...

State The Benefits of Encapsulation To hide the details of a class, you can declare that data or implementation in the private part of class so that other class clients will n

Compute the positive integer and square root, Question: Q1) Write a cod...

Question: Q1) Write a code that asks the user for a positive integer, computes the square root of that integer, and return the result to the user. The computational error needs

Ellipse follows the perimeter of the window, A) Execute a program where an ...

A) Execute a program where an ellipse follows the perimeter of the window. B)  Execute a program that can draw graphs, possibly following your plan from last week. Have it graph

Algebraic method for simplification of boolean expressions, Define Algebrai...

Define Algebraic method for Simplification of the Boolean Expressions This method is depend on the by knowledge of the Boolean algebra. Expression can be making simpler by usin

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd