Can you have constant volatile variables?
Answer / Vikash Shukla
"Yes, a variable can be both const and volatile in C. The const keyword indicates that the value of the variable should not be changed, while the volatile keyword indicates that the variable's value may be modified by hardware or other external factors outside of the program's control. In such cases, the compiler is instructed to avoid optimizations that might rely on the assumption that the variable's value does not change."
| Is This Answer Correct ? | 0 Yes | 0 No |
what is embedded system in a computer system?
What is meant by a sandbox, why you would use one.
Tell me can a variable be both const and volatile?
Explain what is return type of isr?
Discuss the concept of yagni and explain something you did recently that adhered to this practice.
What are the functional requirements that are used in the embedded systems?
What is the purpose of the segment register?
Tell me what are the different types of customizations that is used with the “volatile” keyword?
Write a constant time consuming statement lot finding out if a given number is a power of 2?
What is size of character, integer, integer pointer, character pointer?
Tell us what is the need for an infinite loop in embedded systems?
What is a 'const' variable?