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
Explanation:
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...

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

1. A C-string variable with a something in it is always filled with characters. 2. It is illegal to write ``` char message[] =”Go Home!”; ``` 3. A C-string variable is an array, so it can be indexed to access individual character positions (indexed variables of type character). 4. A C-string is a sequence of characters terminated by the null character.

Computer Science & Information Technology

Output an Accounts object named accounts using XML serialization and a Buffered- Writer named writer.

What will be an ideal response?

Computer Science & Information Technology

Browsers enable users to click ________ to request a new copy of the page from the Web server, ensuring it is the most up-to-date information posted on that Web page

Fill in the blank(s) with correct word

Computer Science & Information Technology

____ is the control or suppression of what can be accessed, published, or viewed on the Internet.

A. Internet censorship B. Pop-up blocking C. Private browsing D. Hacking

Computer Science & Information Technology