Write examples of declarations of external variables, Computer Engineering

Examples of declarations of external variables  that  are  not definitions:

extern char stack[10];

extern int stkptr;

These declarations tell the compiler that the variables stack[] and stkptr are defined elsewhere, usually in some other file. If the keyword extern were omitted, the variables would be considered to be new ones and memory would be allocated for them. Remember, access to the same external variable defined in another file is possible only if the keyword extern is used in the declaration.

/* File : ext.c

This example shows reference to an external variable in more than one file. The program is organized in three files. The external variable 'a1' is defined in 'ext.c', and it is declared as extern in 'FILE3.c' */

 

 

Posted Date: 6/14/2013 6:55:46 AM | Location : United States







Related Discussions:- Write examples of declarations of external variables, Assignment Help, Ask Question on Write examples of declarations of external variables, Get Answer, Expert's Help, Write examples of declarations of external variables Discussions

Write discussion on Write examples of declarations of external variables
Your posts are moderated
Related Questions
Hashing collision resolution techniques are a) Chaining, b) Bucket addressing

DETERMINE ANALYTICALY IF THE SIGNAL IS PERIODIC OR NOT - X[n] = 4Cos(Pi n)

Representation scheme in AI: • It's fairly trouble-free to represent knowledge in this way. It allows us to be expressive enough to represent largely knowledge, while being co

Error detecting method that can detect more errors without increasing additional information in each packet is? Error detecting method which can detect more errors without rais

Q. Explain the graphic display system? The function of your graphic display system is to display bit-mapped graphics on your monitor.  The image displayed on your system so com

Zero address instruction.  It is also possible to use instruction where the location s of all operand is explained implicitly. This operand of the use of the method for storing

Set up a standard population model structure. The population will begin with 24 people. We do not have actual data to support a birth rate, but we could calculate a reasona

What is the significance Timescale directive? Defines time units and simulation precision (smallest increment). Syntax 'timescale TimeUnit / PrecisionUnit TimeUnit =

Q. Terminates a particular PVM process? int pvm_kill( int tid ) Terminates a particular PVM process. tid Integer task identifier of PVM process to be killed (not itself).

This step of systems examination is one of the most difficult. In this stage systems specifications are identified by asking what, who, when, where and how. A few questions address