183k views
5 votes
Functions that are not members of a class are called ________ functions?

1) Static
2) Global
3) Local
4) External

1 Answer

6 votes

Final answer:

Functions not part of a class are called global functions, which are accessible without class reference unlike static functions associated with classes and local functions confined to specific scopes.

Step-by-step explanation:

Functions that are not members of a class are called global functions. Unlike static functions that are associated with a class but can be called without creating an instance of the class, global functions are defined outside any class and can be used without any reference to a class object. Local functions are those that are defined within a scope of a function and can only be used within that function. External functions are those that are declared external and are defined in another compilation unit or a module.

User Barbarian
by
9.2k points