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

Define process, Define Process. Process: It is a program in executi...

Define Process. Process: It is a program in execution; process execution should progress into sequential fashion. Process contains: program counter stack dat

No-signs to the write statement, Suppressing the number signs (+/-) is carr...

Suppressing the number signs (+/-) is carried out using the addition NO-SIGNS to the Write statement.  Statement is wrong.

The periodic table of elements, Make a data structure to store information ...

Make a data structure to store information about the elements in the periodic table of elements.  For each element, store the name, atomic number, chemical symbol, class, atomic we

Risks by customer perspective in electronic payment system, What are the ri...

What are the risks by customer's perspective in Electronic Payment Systems? Risks within Electronic Payment Systems: Through the customer's perspective are as follows:

Real time OS, what is the usuage of Real time Os

what is the usuage of Real time Os

Execute a reduce operation over members of specified group, Q. Execute a re...

Q. Execute a reduce operation over members of specified group? int info = pvm_reduce( void (*func)(), void *data, int count, int datatype, int msgtag, char    *group, int root

What are bags and sequences, What are bags and sequences? A bag is a co...

What are bags and sequences? A bag is a collection of elements with duplicates permitted.  A sequence is an ordered collection of elements with duplicates permitted.

Determine the computer arithmetic operations, Computer Arithmetic Data ...

Computer Arithmetic Data is manipulated with the help of arithmetic instructions in digital computers. Data is manipulated to  produce the results  necessary  to  provide solut

What is the cih, CIH, also known  as Chernobyl or Spacefiller, is a Microso...

CIH, also known  as Chernobyl or Spacefiller, is a Microsoft Windows computer virus which first emerged in 1998. It is one of the most damaging viruses, overwriting critical inform

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