Computer Science, asked by AAFT53, 1 year ago

Which of the following type of data member can be shared by all instances of its class?

A.Public
B.Inherited
C.Static
D.Friend

Answers

Answered by aryark94pbpjno
0
a. static
..............
Answered by MotiSani
0

The correct answer is OPTION C: Static. Static data members can be shared by all of its classes.

  • Static data members are members of a class that has the static keyword expressed.
  • A static member's properties are one-of-a-kind. The following are some of them:
  1. Regardless of how many objects are created, only one copy of that member is created for the entire class and shared by everyone.
  2. It's set up before any of the objects in this class are created, even before the main begins.
  3. It is only visible within the class, but it lasts the entire programme.
Similar questions