0 votes
in C Plus Plus by

What is the role of the Static keyword for a class member variable?

1 Answer

0 votes
by

The static member variable shares a common memory across all the objects created for the respective class. We need not refer to the static member variable using an object. However, it can be accessed using the class name itself.

Related questions

+1 vote
0 votes
asked Mar 10, 2020 in C Plus Plus by rahuljain1
+2 votes
0 votes
asked Jul 2, 2023 in JAVA by rajeshsharma
...