What are the uses of static class data?



What are the uses of static class data?..

Answer / Navram Singh

Static class data is used to maintain shared state across multiple object instances of a class. It is often used for storing constants, counters, or other global data within a class. Static data members are initialized only once and are accessible to all objects of the same class.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What does the following code do: int c=0; cout< a) Undefined *Updated* b) 01 c) 00

1 Answers  


What are stacks? Give an example where they are useful.

1 Answers  


What is the full name of logo?

1 Answers  


Write any small program that will compile in "C" but not in "C++"

10 Answers   Honeywell,


Explain working of printf?

8 Answers  


Can notepad ++ run c++?

1 Answers  


What is flush programming?

1 Answers  


What is :: operator in c++?

1 Answers  


What is a static element?

1 Answers  


What apps are written in c++?

1 Answers  


Can I run c program in turbo c++?

1 Answers  


Is c++ proprietary?

1 Answers  


Categories