answersLogoWhite

0

Yes.

User Avatar

Wiki User

10y ago

What else can I help you with?

Related Questions

Can static variables be declared in header file?

Can static variables be declared in a header file?You can't declare a static variable without defining it as well (this is because the storage class modifiersstatic and extern are mutually exclusive). A static variable can be defined in a header file, but this would cause each source file that included the header


What happen if you declare a global variable as static in C language?

When declared as static, the variable has internal linkage and its scope is restricted to the *.c file in which it is declared. It becomes visible to all functions within the file where it is declared and not to functions in other files.


Scope of static variables?

Scope of static variable is with in the file if it is static global. Scope of static variable is with in the function if variable is declared local to a function. But the life time is throughout the program


How do you declare a function only if undeclared anywhere else even if the somewhere else is a file included after?

Your question makes no sense, but here is a simple rule: Public functions' declarations should be in a header file, local (or static) functions' declaration at the beginning of the source file.


What are Static variables in c?

A static variable in C is a variable whose value and memory allocation persists throughout the execution of the program. If the variable is declared at file scope (outside of any blocks) the static attribute means the variable is visible only to the file containing it, i.e. it can not be referenced through an extern reference in a different file.


What is difference between Static and Global variable?

Static may be local of global -local static variable is limited to the function scope. and retain it's value when function is been called . compiler differentiate static variables with a prefix function name while dealing with same name static variable in different functions. - Global static variable is visible to all the function defined in the file and retain it value but it cannot be used outside this file. now Global Variable --- this variable is also visible to all of the functions inside the file but also can be used outside the file via extern keyword.


Can static variables be declared in a header file in C programming?

Yes (but usually it is a bad idea).


What is static char in C?

static storage class in C tells that: The variable will have the default value as zero. The variable scope will be the file in which it is defined. RaVi


Why static variables in a function have global extent?

A variable declared static outside of a function has a scope the of the source file only. It is not a global variable. A variable declared outside of a function and without the static qualifier would be a global variable.


How do you design inline function as a member function?

You define the function at the same time you declare it, usually in the header file, sometimes in an .hpp file.


Which header file should you include if you are to develop a function which can accept variable number of arguments?

stdarg.h


Which is the keyword used to limit the scope of a function to the file in which it resides?

Declare the function static.