adspace
How is static data member similar to a global variable?
Answer Posted / 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 |
Post New Answer View All Answers