adspace


What do you mean by volatile and mutable keywords used in c++?

Answer Posted / Mudit Kumar

In C++, the `volatile` keyword is used to inform the compiler that a variable's value might be modified by means outside of the program, such as hardware or another thread. On the other hand, the term 'mutable' is not a keyword in C++ but rather a concept used within C++11's std::mutex, where it indicates that the variable can be modified while the mutex is locked, allowing for more efficient synchronization.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What character terminates all character array strings a) b) . c) END

1397


What is the latest version on c++?

1209


Can union be self referenced?

1268


How c functions prevents rework and therefore saves the programers time as wel as length of the code ?

1165


daily Routine of father

1485