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

Why java is called machine independent, Why Java is called Machine Independ...

Why Java is called Machine Independent? While a java program is compiled this is not converted in an executable code. Rather, this is converted in a byte code. Byte code is hig

Assessing heuristic searches-artificial intelligence, Assessing Heuristic S...

Assessing Heuristic Searches Given a specific problem you want to create an agent to solve, there can be more than one way of specifying it as a search problem, more than one o

Interpreter, difference between pure and impute inter preter

difference between pure and impute inter preter

Baic electrical, Ask question #Minimumstate and explain thevenins theorem a...

Ask question #Minimumstate and explain thevenins theorem as applicable to electrical circuits 100 words accepted#

Find point-to-point link required in fully connected network, The number of...

The number of point to point links required in a fully connected network for 50 entities is? The number of point to point links needed in a completely connected network for 50

Explain the process of theory driven discovery, Question 1 Explain brie...

Question 1 Explain briefly the process of matching production rules against working memory 2 Explain Simplification, Conjunction and Transportation in propositional logic by

Explain about memory buffer register, Q. Explain about Memory Buffer Regist...

Q. Explain about Memory Buffer Register? Memory Buffer Register (MBR): It's a register that comprises the data to be written in memory (write operation) or it obtains the data

Show the frames inside other frames, Q. Show the Frames inside other frames...

Q. Show the Frames inside other frames? Here we would discuss how to divide frames into different frames that is how to put horizontal frames in a vertical one and vice-versa.

Why is TCP called end-to-end protocol, Why is TCP called end-to-end protoco...

Why is TCP called end-to-end protocol? TCP is termed as an end-to-end protocol as this provides a connection directly by an application in one computer to an application on a r

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