How is static data member similar to a global variable?
Answer / Jeetendra Kumar Pandey
Static data members are similar to global variables because they have a lifetime for as long as the program runs, and they can be accessed from anywhere within their scope. However, static data members belong to a specific class, while global variables do not.
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the different types of variables in C++?
What happens if a pointer is deleted twice?
What problem does the namespace feature solve?
Is c++ used anymore?
What is Pure Virtual Function? Why and when it is used ?
What is meaning of in c++?
let a,b,c be three integer numbers.write a c++ program with a function void rotate 1()such that a->b->c and c->a.
how to find the maximum of 10 numbers ?
Is c++ slower than c?
What is vectorial capacity?
How do you generate a random number in c++?
How can a called function determine the number of arguments that have been passed to it?