answersLogoWhite

0


Best Answer

Declare the function static.

User Avatar

Wiki User

7y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Which is the keyword used to limit the scope of a function to the file in which it resides?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What are the limitations of friend function?

Only that they cannot be inherited by derived classes. This is "a good thing". Other than that, a friend function has full access to a class' private and protected members and you cannot limit its scope.


Which variable is not destroyed on exit from the function instead its value is presented and becomes available again when the function is next called These variables are declared as?

Local function variables defined static remain in memory at all times. Such variables are only in scope (accessible) when the function itself is in scope.


How are the keywords struct and class different?

The keyword class is not a keyword in C. It is a keyword in C++, so I have added C++ to the category list for this question.The default access specifier for struct is public, while for class, it is private.Struct does not allow you to specify methods, while class does.A struct is not a class, and cannot be derived, while a class can be treated as a struct, if the scope and access is correct.


What are the limitations of friend function in c plus plus?

Only that they cannot be inherited by derived classes. This is "a good thing". Other than that, a friend function has full access to a class' private and protected members and you cannot limit its scope. At this data hiding feature of c++ is broken.


What is mean by scope in c language?

Scope is generally defined as variable or functions life... Generally the life is between the opening braces and close braces "{ }" ... If thee variable is defined as "static" and if is defined outside a function then its scope is in same file. if defined as global then its scope is across the files.

Related questions

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

Declare the function static.


What are the limitations of friend function?

Only that they cannot be inherited by derived classes. This is "a good thing". Other than that, a friend function has full access to a class' private and protected members and you cannot limit its scope.


What are the scope and limitation of illegal logging?

all i know is that scope mean "nasasakupan" and limitation is "limit"


Meaning scope and role of marketing function in exchange process with suitable examples?

scope and role of marketing function in the exchange process


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


Is a muzzleloading scope and a rifle scope the same thing?

They perform the same function, but, they are not the same.


What are the limitations of functionalism?

Only that they cannot be inherited by derived classes. This is "a good thing". Other than that, a friend function has full access to a class' private and protected members and you cannot limit its scope.


What is the scope of a static function in C?

The source file it is in.


What are synonyms for compass?

range, field, area, reach, scope, limit, extent, boundary


Which variable is not destroyed on exit from the function instead its value is presented and becomes available again when the function is next called These variables are declared as?

Local function variables defined static remain in memory at all times. Such variables are only in scope (accessible) when the function itself is in scope.


What should I do when scope not digest in angular java script?

Apply $scope.$apply(); It's better to have apply in timeout syntax as below : SetTimeout(function() {$scope.$apply();},10);


Can you explain the nature and scope of the product or service management function?

bush