Embedded Software Engineer Question:

Tell me can a variable be both const and volatile?

Tweet Share WhatsApp

Answer:

The const keyword make sure that the value of the variable declared as const can't be changed. This statement holds true in the scope of the program. The value can still be changed by outside intervention. So, the use of const with volatile keyword makes perfect sense.

Download Embedded Software Engineer PDF Read All 100 Embedded Software Engineer Questions
Previous QuestionNext Question
Tell me what are the 4 types of inheritance relationship?Tell me can we put breakpoint inside ISR?