Should you protect the global data in threads? Why or why
not?

Answer Posted / aravind k r

Global data need to be stored in a common place where each
thread can access it within that program. So it shouldnot
be stored on a particular thread but in the process's
memory where each thread can access it.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can an interface inherit a class?

553


What is the real life example of polymorphism?

603


Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer

1610


What is the point of oop?

645


Why is destructor used?

576






What is advantage of inheritance?

685


What are the components of marker interface?

598


how to get the oracle certification? send me the answer

1661


Can private class be inherited?

615


What is destructor in oop?

617


What does enum stand for?

605


class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash

1689


What is object and class in oops?

577


What do you mean by Encapsulation?

636


What are the benefits of interface?

571