Embedded System Question:
Download Job Interview Questions and Answers PDF
Explain What are different qualifiers in C?
Answer:
1) Volatile:
A variable should be declared volatile whenever its value could change unexpectedly. In practice, only three types of variables could change:
► Memory-mapped peripheral registers
► Global variables modified by an interrupt service routine
► Global variables within a multi-threaded application
2) Constant:
The addition of a 'const' qualifier indicates that the (relevant part of the) program may not modify the
variable.
A variable should be declared volatile whenever its value could change unexpectedly. In practice, only three types of variables could change:
► Memory-mapped peripheral registers
► Global variables modified by an interrupt service routine
► Global variables within a multi-threaded application
2) Constant:
The addition of a 'const' qualifier indicates that the (relevant part of the) program may not modify the
variable.
Download Embedded System Interview Questions And Answers
PDF
Previous Question | Next Question |
Explain What are the different qualifiers in C? | Explain What are the 5 different types of inheritance relationship? |