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

State the benefits of object oriented modelling, Benefits of object oriente...

Benefits of object oriented Modelling There are many benefits and advantages of object oriented modelling. Emphasis on quality and reuse are the major highlights of OOM. OOM p

Explain working of digital camera, Q. Explain working of Digital camera? ...

Q. Explain working of Digital camera? A Digital camera is a camera which captures and stores still images and video (Digital Video Cameras) as digital data in place of on photo

Objectives of information distribution, Objectives After studying this ...

Objectives After studying this unit you should be able to: 1. list various types of reprographic methods, 2. describe uses of various kinds of typewriters, 3. explain

Minimum power dissipation of digital logic family, Which digital logic fami...

Which digital logic family has minimum power dissipation ? Ans. The minimum power dissipation of digital logic family is CMOS. CMOS being an unipolar logic family, occupy a to

Dram, DRAM consists of MOSFET's but the technique is to use the drain sourc...

DRAM consists of MOSFET's but the technique is to use the drain source capacitance to hold charge. If charge is present logic '1' is held, no charge logic '0'. As you know capacito

What is server in sap terminology, What is Server in SAP terminology? ...

What is Server in SAP terminology? A component can having of one process or a group and is then known as the server for the respective service.

Authentication system differ from a firewall in functioning, How does an au...

How does an authentication system differ from a firewall in functioning?   Authentication vs. firewall User Authentication and Authorization A significant advanced fi

What are the steps to design algorithm, What are the steps to design algori...

What are the steps to design algorithm? Formulate algorithm for each operation. Analysis specification tells what the operation does. The algorithm shows how it is done. The st

What are batch systems, What are batch systems?  Batch systems are quit...

What are batch systems?  Batch systems are quite appropriate for implementing large jobs that need little interaction. The user can submit jobs and return later for the results

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