What is the difference between a local variable and a data member?
What will be an ideal response?
A local variable is declared in the body of a function and can be used only from its declaration to the closing brace of the block in which it’s declared. A data member is declared in a class, but not in the body of any of the class’s member functions. Every object of a class has each of the class’s data members. Data members are accessible to all member functions of the class.
Computer Science & Information Technology
You might also like to view...
Storage Spaces can be used to create a striped drive array
Indicate whether the statement is true or false
Computer Science & Information Technology
When you make a change to a library item, you must manually make the same change for all the pages where the library item is used.
Answer the following statement true (T) or false (F)
Computer Science & Information Technology