Tell me can a variable be both const and volatile?



Tell me can a variable be both const and volatile?..

Answer / Deepika Shende

No, a variable cannot be both 'const' and 'volatile' in C. The 'const' keyword indicates that the value of the variable should not be modified, while 'volatile' means that the value may change outside the current scope or due to hardware modifications. Since 'const' implies the value is unchanging, it conflicts with the 'volatile' property.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Embedded Systems AllOther Interview Questions

Explain the concept of separation of concerns?

1 Answers  


How can you reduce memory requirements in embedded systems?

1 Answers  


What is an anti-aliasing filter?

1 Answers  


Tell me what is embedded system in a computer system?

1 Answers  


Describe a time when you collaborated with designers and engineers to deploy a new product. What was your role?

1 Answers  


What is interrupt latency? How can you reduce it?

1 Answers  


Can we put breakpoint inside isr?

1 Answers  


whether the mulitasking and multiprocessing are same or not.

10 Answers  


Explain the software analysis process, such as code analysis, code metrics, and system risk analysis or software reliability.

1 Answers  


What are recursive functions? Can we make them in line?

1 Answers  


Is count down_to_zero loop better than count_up_loops?

1 Answers  


Tell me whether we can use semaphore or mutex or spinlock in interrupt context in linux kernel?

1 Answers  


Categories