Interviewer And Interviewee Guide

C++ Programmer Interview Question:

Please explain the volatile and mutable keywords?

Submitted by: Muhammad
The volatile keyword informs the compiler that a variable may change without the compiler knowing it. Variables that are declared as volatile will not be cached by the compiler, and will thus always be read from memory.

The mutable keyword can be used for class member variables. Mutable variables are allowed to change from within const member functions of the class.
Submitted by: Muhammad

Read Online C++ Programmer Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.