What do you mean by volatile and mutable keywords used in c++?
Answer / 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 |
write program for palindrome
81 Answers Amazon, Aricent, CSC, GE, HCL, Infosys, Syntel, Temenos, Wipro,
What is the difference between the parameter to a template and the parameter to a function?
Explain the difference between struct and class in terms of access modifier.
template<class T, class X> class Obj { T my_t; X my_x; public: Obj(T t, X x) : my_t(t), my_x(x) { } }; Referring to the sample code above, which one of the following is a valid conversion operator for the type T? a) T operator T () { return my_t; } b) T operator(T) const { return my_t; } c) operator(T) { return my_t; } d) T operator T (const Obj &obj) { return obj.my_t; } e) operator T () const { return my_t; }
what is the use of Namespace in c++.
What is the sequence of destruction of local objects?
What is dev c++ used for?
When a function is made inline. Write the situation where inline functions may not work.
What is the purpose of decltype?
What is do..while loops structure?
What is setfill c++?
What are function poinetrs? where are they used?