A class member that is to be shared among all objects of a class is called

a) A const member
b) A reference member
c) A static member.
d) A value member
e) A function member


c) A static member.

Static function members do not use need a calling object. They provide the usefulness of a global data members without the abuses that are usually associated with global members in part because the static data member is local to the class. A static member variable must be initialized outside the class (by the class author).
A static member function does not use data from any object, so in that sense it is shared by all members.
Static member functions act as global functions for the class without affecting the rest of the program. Like real global functions, they do not have access to data in the any object. The association of static member function with the class is explicit and obvious, but for real global function this is not true.

Computer Science & Information Technology

You might also like to view...

When selecting text colors, try to limit using ____.

A. blue B. red C. green D. yellow

Computer Science & Information Technology

"Where the cable connects to a jack or a patch panel" defines which of the following?

A) Closet B) TCO C) Termination D) None of these answers are correct.

Computer Science & Information Technology

Background images are applied through a style rule instead of being directly inserted into a(n) CSS layout page as other images are. 

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

What HTTP method is the same as the GET method, but retrieves only the header information of an HTML document, not the document body?

A. CONNECT B. PUT C. POST D. HEAD

Computer Science & Information Technology