Explain the storage class extern, Computer Engineering

Assignment Help:

Explain The Storage Class extern

The Storage Class extern : One method of transmitting information across blocks and functions is to use external variables. When a variable is declared outside the function, storage is permanently assigned to it, and its storage class is 'extern'. A declaration for an external variable can look just the same as declaration for a variable that occurs inside a function or block. Such a variable is considered to be global to all functions declared after it, and upon exit from the block or function, the external variable remains in existence.

An example is

int a,b,c; /* Global Variables*/

void main()

{

Statements;

}

We can also rewrite the above example starting with 'extern'

extern int a, b, c;

void main()

{

Statements;

}

This use of 'extern' will cause  runtime errors in traditional compilers.

 


Related Discussions:- Explain the storage class extern

Procedure level- levels of parallel processing, Procedure Level Here, p...

Procedure Level Here, parallelism is accessible in the form of parallel executable procedures. In this situation, the design of the algorithm plays a main role. For example eac

Find the shortest path, The following is the required interface for the mou...

The following is the required interface for the mouse and cheese problem. Your program is required to read its input from a file named 'maze.txt' In the maze.txt

How to create a bugzilla account? , 1. Enter your "E-mail address...

1. Enter your "E-mail address" and "Real Name" (or whatever name you need to call yourself) in the spaces given, then select the "Create Account" button. 2. Within moments, you

Define memory latency, Define Memory Latency? It is used to refer to th...

Define Memory Latency? It is used to refer to the amount of time it takes to transfer a word of data to or from the memory.

Universal serial bus - computer architecture, Universal Serial Bus - comput...

Universal Serial Bus - computer architecture: USB   Universal Serial Bus   Speed Low-speed(1.5 Mb/s) High-speed(480 Mb/s) Full-speed(12 Mb/s)   De

Determine about the authoring software, Determine about the Authoring Softw...

Determine about the Authoring Software Also termed as author ware; this is a program which helps in the writing of hypertext or multimedia applications. Authoring tools general

Multiple program multiple data, Like SPMD, MPMD is actually a "high level" ...

Like SPMD, MPMD is actually a "high level" programming model that can be built upon any combination of the previously mentioned parallel programming models. MPMD applications ty

Conversion of decimal number 10.625 into binary number, Conversion of decim...

Conversion of decimal number 10.625 into binary number ? Ans. There is integer part is 10 and fractional part is 0.625. Firstly convert the decimal number 10 in its equal bina

How to add css style to your page, Q. How to add CSS style to your page? ...

Q. How to add CSS style to your page? Step 1: Click on Window Menu Step 2: Select CSS Styles Or Click on CSS Styles in the "Launcher" Step 3: Click on New to create a

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