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

What are the different types of parameters, What are the different types of...

What are the different types of parameters? Formal Parameters: Parameters, which are described during the definition of subroutine with the FORM statement.

What is source and listener, A source is an object that produces an event. ...

A source is an object that produces an event. This happens when the internal state of that object changes in some way. A listener is an object that is notified when an event happen

Explain efficiency performance and issues in pipelining, Efficiency The...

Efficiency The effectiveness of pipeline can be measured the same as the ratio of busy time span to total time span counting the idle time. Let c be clock period of a pipeline

Medical diagnosis program, Diagnosis: Medical diagnosis program bases on p...

Diagnosis: Medical diagnosis program bases on probabilistic analysis have been able to perform at the level of an expert physician tin several areas of medicine. Heckerman(1981)

Explain the working of static ram - computer memory, Explain the working of...

Explain the working of Static RAM - Computer Memory? SRAM devices tender extremely fast access times (approximately four times faster than DRAM) but are much more expensive to

Implement or, Q. Write a program to implement OR, NOR, AND and NAND gates ...

Q. Write a program to implement OR, NOR, AND and NAND gates using and without using Bit wise operator. The menu should be as follows: I. Using Bit Wise operator II. Withou

Maximum size of a database, What is the maximum size of a database that can...

What is the maximum size of a database that can be opened in Microsoft Access? Ans) 1 Gigabyte

Explain macro definition and call, Explain Macro definition and call. ...

Explain Macro definition and call. Macro: The assembly language programming frequently finds this necessary to repeat certain piece of code several times during the course of

Convert ascii code to its bcd equivalent, Convert ASCII code to its BCD equ...

Convert ASCII code to its BCD equivalent. This can be achieved by simply replacing bits in upper four bits of byte by four zeros. For illustration the ASCII '1' is 32h = 0010B. By

What is busy hour traffic, Busy hour traffic is the (A)  maximum avera...

Busy hour traffic is the (A)  maximum average simultaneous traffic. (B)  traffic during peak hour. (C)  traffic when all subscribers are engaged. (D)  the durat

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