answersLogoWhite

0

Might be, but don't forget the keyword 'extern':

int main (void)
{
extern int errno;
...
}

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What are the differences between global variables and local variables in C plus plus?

Global variables can be seen in all blocks of your program, when local variables are visible only within the block where it's declared.


Is it True or False that Variables declared in the particular member function are know as data members and can be used in all member functions of the class?

False. Variables declared within a particular member function are local to that function, and are automatically allocated and deallocated at entry and exit of the function.


What are local variables and global variables?

Local variables: These variables only exist inside the specific function that creates them. They are unknown to other functions and to the main program. As such, they are normally implemented using a stack. Local variables cease to exist once the function that created them is completed. They are recreated each time a function is executed or called. Global variables: These variables can be accessed (ie known) by any function comprising the program. They are implemented by associating memory locations with variable names. They do not get recreated if the function is recalled.


What is the difference between global variable and extern variable?

Global variables are non-local variables. That is, variables that are not defined in a function or class. They are globally accessible to all code in the same translation unit. External variables are global variables that have external linkage; they are accessible across translation units.


How do you declare local and global variables in pseudo code?

Pseudocode is not a programming language (it's specifically intended for human interpretation), so there is no need to declare variables, you simply define them as and when you require them. For instance: Let x = 42 Let y = x * 2


How do you access global variable from within the main function when the local variable is of the same name?

When you acess a global variable inside main function you must use the same name, because the variable declared as global can be accessed by any function/procedure on the class where it was defined.


What is global variable in C programming?

A global variable is a variable that is declared at global scope, rather than file, namespace, function, class or nested scope. Global variables are usually declared with external linkage within a header and initialised in one (and only one) source file. Any file that includes the header (which includes the source file that initialised the global variable) then has unrestricted access to the variable. It is globally visible and any code can alter it. Global variables should be used sparingly and only when absolutely necessary. If the vast majority of the functions in your program require access to a particular variable, then a global variable makes perfect sense and is by far the simplest solution. However, a variable that is only used by a handful of functions can hardly be described as a global entity, thus it has no place within the global namespace and should be scoped to those functions that actually require it instead.


Variables declared within a button's click-event are?

Local


What are instance variables?

These are normal variables declared within a class that are attached to an object instance of a class.


Examples of automatic variables in c?

Automatic variables are variables that are declared within the scope of a block, usually a function. They exist only within that scope, i.e. that block, and they cease to exist after the block is exited. These variables are usually allocated from the stack frame.


What are the advantages of local variables in programming?

1. Local variables cannot be used by other forms. 2. Cannot be used globally. 3. They can slowdown the compiling process.


What is local in computer scince?

In computer science, "local" typically refers to data or variables that exist and are accessible within a specific scope or context, such as within a function or a block of code. Local variables are usually declared and used within a limited area of a program, and their scope is restricted to that particular area.